These sample source codes on this page below are displaying how to generate xls spreadsheet with spreadsheet sdk in ASP Classic. ByteScout Barcode Suite is the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK. It can be applied to generate xls spreadsheet with spreadsheet sdk using ASP Classic.
These ASP Classic code samples for ASP Classic guide developers to speed up coding of the application when using ByteScout Barcode Suite. IF you want to implement the functionality, just copy and paste this code for ASP Classic below into your code editor with your app, compile and run your application. Applying ASP Classic application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.
You can download free trial version of ByteScout Barcode Suite from our website to see and try many others source code samples for ASP Classic.
<% ' In case of "Server.CreateObject Failed", "Server object error "ASP 0177 : 8000ffff" or similar errors: ' Please try the following: ' - Open IIS ' - Find application pools (DefaultAppPool is used by default) ' - Open its properties and check .NET CLR version selected: ' - if you have .NET 1.1 then change to .NET CLR 2.00 ' - if you have .NET CLR 2.00 then try to change to .NET CLR 4.0 Set document = Server.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!" ' Generate and get XLS document as an array of bytes XLSDocumentArray = document.GetAsBytesArrayXLS response.ContentType = "vnd.ms-excel" ' Add content type header response.AddHeader "Content-Type", "application/vnd.ms-excel" ' Set the content disposition response.AddHeader "Content-Disposition", "inline;filename=HelloWorld.xls" ' Write the binary image to the Response output stream response.BinaryWrite XLSDocumentArray response.End ' Release library Set document = Nothing %>