Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

"Column out of Range" Error when populating an Excel Sheet

$
0
0

I just started implementing this to populate an Excel sheet with some data:

using OfficeOpenXml;

//..
ExcelWorksheet VerificationSheet_Sheet4 = package.Workbook.Worksheets.Add("SheetTitleHere");
int row = 0, col = 0;
VerificationSheet_Sheet4.Cells[row + 1, col].Value = "AnyStringHere"; // error here

However it pops an error saying column is out of range. Why and how can I fix that?


Viewing all articles
Browse latest Browse all 88835

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>