| || |
best way to read data from excel file
I am reading the data from excel file with using excel object but the issue is in that file more than 100 columns are there.
I reading all the data and saving in variables,so the variables also more than 100...
its not looking good at the starting of the script 100 lines are there for only variables.
is there any other better way to read data from Excel with using excel object
below is my code,
Set xl= CreateObject("Excel.Application")
For j = 2 to Rcount
'''here my code
Thanks in Advance,
it would be good if you use the dictionary object - try importing the sheet and use the dictionary object to create/assign variables.
Have you thought about using a Split command to write all 100 variables into an array in 1 line only, it might be easier to rad in as a CSV and split on comma.
My group handles this in a few ways: 1) read it into a multi-dimensional array, 2) read it into an array of arrays (one array has items that are arrays containing one row of data each), 3) arrays of dictionaries (each dictionary contains one row of data with keys equal to column headers).