Tutorial ASP – Dynamically Generate Formatted Excel Reports

Tutorial ASP Dynamic Excel Reports with ASP

This tutorial asp shows a quick and easy way to generate Excel reports using just ASP. It allows the server to dynamically create Excel reports without taking up any space on the server, and also allows multiple concurrent users to receive these reports simultaneously. The generated reports can be complete with Excel formulas, which allows intensive calculations to be moved to the client side. This method only works with Excel 97 or later.

This section makes it possible to gather a whole of techniques or scripts which have the originality to manage to solve a difficulty with the least effort or which are particularly effective…The grayed entries relate to the future headings which will supplement soon this toolbox.

Read here the full tutorial

There are certain web scenarios that demand both Reporting and Presentations, a combination of parts or objects that can work together well. The article explains how easy it is to design and generate stylish excel reports dynamically in WYSIWYG manner. It exports data from an XML file (You may also utilize other data sources) to Aspose.Cells.GridWeb control which provides you the real environment that allows you to apply rich and appealing format to data and calculate formula results like MS Excel. It also generates a sophisticated chart based on the Worksheet source data using Aspose.Chart component and pastes the chart image into the Sales Report. Finally, the excel report with graph attached is saved to disk using Aspose.Cells component.

This article includes the source code and fully featured demo project for such functionality.

It allows the users with a detailed perceptive on how to create a business report to input data into a worksheet of the grid and apply some formatting to the cells in the rows and columns, embed a graph based on the source range of data before saving the excel report to the disk.


  • A free component to create Excel files on the fly :

This short example will help you to learn how to create a simple Excel file on the fly with DypsXLS.


  set wbook = createObject("DypsXLS.XLSApplication")  
 'Create a Workbook Object and set a password 
 'to make it read-only
 'Set wbook = CreateExcelWorkbook()    
  wbook.password = "myPassword"
  ' The default font is Tahoma,10
  wbook.SetDefaultFont "Tahoma", 9     
  ' Create Worksheets
  ' SecondSheet is hidden
  ' The sheet name could be ommit in 
  ' order to have the default one

  ' Add Sheet and return a XLSWorkSheet object
  Set wsheet = wbook.AddSheet("MySheet")
  'Get a reference to the second sheet
  Set wsheet = wbook.GetSheet(2)
  'and similar :
  Set wsheet = wbook.GetSheet("SecondSheet")
  ' Set the scale factor for the sheet (in percent)
  wsheet.ScaleFactor = 95

  'Set the active sheet when opened
  wbook.SetActiveSheet "MySheet"
  '' Or
  wbook.SetActiveSheet 3

  'adding cells to a worksheet
  Set cell = wsheet.AddCell(1, 1,"MyValue")  'cell A1
  'Use GetCell to retrieve an already existing cell
  Set cell = wsheet.GetCell(1, 1)  'Cell A1
  cell.value = "4"

  'If you have write permission :
  wbook.Save server.mapPath("myExcelWork.xls")

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>