Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Sat Feb 09, 2008 4:51 am

Hi please tell me where can see examples of the Spire.Xls, for open existing books, read and write in sheets of a woorkbook of Microsoft excel from visual studio 2005, please help me, Thanks

luferma
 
Posts: 1
Joined: Sat Feb 09, 2008 4:31 am

Thu Feb 14, 2008 7:45 am

Thank you for interesting our products.
Please try to using following source code,

Code: Select all
   Workbook workbook = new Workbook();
         
         //Load workbook from disk.
         workbook.LoadFromFile(@"..\..\..\..\..\..\Data\EditSheetSample.xls");
         //Initailize worksheet
         Worksheet sheet = workbook.Worksheets[0];

         //Writes string
         sheet.Range["B1"].Text = "Hello,World!";
         //Writes number
         sheet.Range["B2"].NumberValue = 1234.5678;
         //Writes date
         sheet.Range["B3"].DateTimeValue = System.DateTime.Now;
         //Writes formula
         sheet.Range["B4"].Formula = "=1111*11111";

         workbook.SaveToFile("Sample.xls");
User avatar

Flash
 
Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm

Return to Spire.XLS