I am programatically reading an Excel file in C#.
When I use Excel.Worksheet.Columns.columns.count, I get a value above 16,000.
But my excel sheet has only 15 columns. How do I get only those columns that have a value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is how I usually do this:
so, the key is to use UsedRange, I hope this will help.