.NET component
Read / Write / Generate Excel XLSX XLS files

Excel Jetcell .NET

• File formats: Excel Spreadsheet XLSX, XLS, CSV.
• 100% managed .NET component.
• Doesn't require Microsoft Excel.
• High performance (~50000 records per second).
• Plain & Fair licensing.
• Royalty-Free. No extra cost for Server license.
• 6 Months: Free Support + Free Updates.
Evaluation Version
Download  |   Online Demo
Developer License - $175
Buy now  |   Price List

Skip Navigation LinksUser Experience > Column Data

Excel Jetcell .NET component



Learning Resources




FREE version

News & Releases

May 20, 2016
Version 3.1 Update
Excel Jetcell .NET component
March 24, 2016
Version 3.1 Update
Excel Jetcell .NET component
January 29, 2016
Version 3.1 Update
Excel Jetcell .NET component
October 14, 2015
Version 3.1 Update
Excel Jetcell .NET component
March 03, 2015
Version 3.1 Update
Excel Jetcell .NET component
May 15, 2013
Version 3.1 Update
Excel Jetcell .NET component
November 15, 2012
Version 3.1 Update
Excel Jetcell .NET component

Get Data of Specific Column

"How would you suggest the fastest way to retrieve a specific column (the PartID) from a Sheet, get price info from sql database and copy that price to a column we would add to the original sheet?"
Kyle Wilson

Let us assume that "int[] Price" are price values that you have got from SQL Database.
We need to take ID of item and find a price from Database (Price[]) to fill new column "Price".

  1. // Read XSLX file
  2. ExcelWorkbook Wbook = ExcelWorkbook.ReadXLSX(@"..\base.xlsx");
  3. ExcelCellCollection Cells = Wbook.Worksheets[0];
  4.  
  5. // Get index of column that contains data of PartID
  6. int ColIdx = 0;
  7.  
  8. // Add new column
  9. Wbook.Worksheets[0].Columns.Insert(1);
  10. Wbook.Worksheets[0].Columns[1].Cells[0].Value = "Price";
  11.  
  12. // Fill Price column
  13. for (int RowIdx = 1; RowIdx < Cells.Height; RowIdx++)
  14. {
  15. int PartID = Cells[RowIdx, ColIdx].Value;
  16. Cells[RowIdx, 1].Value = Price[PartID];
  17. Cells[RowIdx, 1].Style.StringFormat = DefinedFormats.Currency;
  18. }
  19.  
  20. // For Excel Jetcell only
  21. Wbook.WriteXLSX(@"Excel_Price_List");