Hi,
I am using the Aspose Dll in SSIS Package to get the data from the Excel and Dump it my temp table but the Columns and rows are not fixed in excel so, I have get the count the dynamically and i using below statement to get the Column count. but it giving me the more count than count present in the sheet. It is not happening all the sheets.
Note : I have tried to press ctrl + shift + End to check the End to find the last columns of the sheet. then it moving the curson to last cell where data is present.
ExcelWorkbook.Worksheets(RTrim(sheetName.Replace("$", ""))).Cells.Columns.Count.ToString
Please let me know in case you need more information.
Please help me in this because it issue in production server.
Thanks & Regards,
Naveen
Hi,
I am using the Aspose Dll in SSIS Package to get the data from the Excel and Dump it my temp table but the Columns and rows are not fixed in excel so, I have get the count the dynamically and i using below statement to get the Column count. but it giving me the more count than count present in the sheet. It is not happening all the sheets.
Note : I have tried to press ctrl + shift + End to check the End to find the last columns of the sheet. then it moving the curson to last cell where data is present.
ExcelWorkbook.Worksheets(RTrim(sheetName.Replace("$", ""))).Cells.Columns.Count ( not there) ToString
Please let me know in case you need more information.
Please help me in this because it issue in production server.
Thanks & Regards,
Naveen
Hi Naveen,
Well, Cells.Columns.Count gives you the sum of those columns which are initialized. For your info, the Cells.Columns.Count would not include the columns with default width (8.43), so, it might possible that it will not give you your desired results. I think you should use Cells.MaxDataColumn to get the farthest column index(0 based) that has data in it as per your requirement.
If you still have confusion, kindly let us now. Also, post your template file with details in that case.
Thank you.