Getting Started in Visual Basic 6
Free Trial Web API version Licensing Request A Quote
HAVE QUESTIONS OR NEED HELP?SUBMIT THE SUPPORT REQUEST FORM or write email toSUPPORT@BYTESCOUT.COM
IMPORTANT: for the latest source code for this sample please check The following example demonstrates usage of Spreadsheet class in Visual Basic 6 (through ActiveX interface)
The following example demonstrates usage of Spreadsheet class in Visual Basic 6 (through ActiveX interface)
VB
' IMPORTANT NOTE: you need to have .NET Framework 1.10 installed to use Spreadsheet SDK from Visual Basic ' to download and install .NET Framework 1.10 please use this link: http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3 Set document = CreateObject("Bytescout.Spreadsheet.Spreadsheet") ' Add new worksheet Set worksheet = document.Workbook.Worksheets.Add("HelloWorld") ' get cell value Set cell = worksheet.Item(0, 0) ' you can also use worksheet.Cell("A1") as well ' set cell value cell.Value = "Hello, World!" ' delete output file if exists already Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FileExists("Output.xls")) Then fso.DeleteFile ("Output.xls") Set fso = Nothing ' save document document.SaveAs "Output.xls" ' close Spreadsheet Set document = Nothing End Sub