Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

Wed Dec 29, 2010 8:13 am

i have a xls file ,contains 10 columns.use spire.xls version 5.82 read this xls file,but read 9 columns.lost one column data.
this file has the pringsetting:PageSetup.CenterHeader、PageSetup.CenterLeft、PageSetup.CenterRight etc.
the file in attachments
please help me, thanks!
Attachments
PDA.rar
(1.78 KiB) Downloaded 277 times

fugees
 
Posts: 5
Joined: Fri Oct 29, 2010 8:46 am

Thu Dec 30, 2010 2:17 pm

Hi,

Thanks for your inquiry.
please try:
Code: Select all
            Spire.Xls.Workbook workbook = new Spire.Xls.Workbook();
            workbook.LoadFromFile(@"PDA.xls");
            Spire.Xls.Worksheet worksheet = workbook.Worksheets[0];
            String label = worksheet.Range["J1"].Text;   // or worksheet.Range["J1"].Value
            String count = worksheet.Range["J2"].Value; // or double count = (double)worksheet.Range["J2"].Value2, worksheet.Range["J2"].NumberValue
e-iceblue support
User avatar

iceblue support
 
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.XLS