I have several Excel files that contain several sheets. I need to convert these files into one table in gdb. I wrote script that convert the whole sheet in separate table. How can I export a range (f.e. A8:G(rows on the sheet)) of the sheet to one table.
import arcpy, os, xlrd,xlwt
from arcpy import env
arcpy.env.overwriteOutput = True
fname = 'D:/excel_files/exc4.xls'
output_gdb = "D:/P01_ExctoGDB/GDB_EXC.gdb"
# Open the workbook
rb = xlrd.open_workbook(fname)
# List sheet names, and pull a sheet by name
sheet_names = rb.sheet_names()
for i in range(0,len(sheet_names)):
sheet=rb.sheet_by_index(i)
val=sheet.row_values(0)[0]
arcpy.AddMessage(val)
vals=[sheet.row_values(8) for rownum in range(sheet.nrows)]
outTablename= output_gdb+"/"+str(sheet_names[i]).replace(" ",'').replace(".","")
arcpy.ExcelToTable_conversion(fname,outTablename, sheet_names[i])