xlsgen > overview > Online spreadsheets |
xlsgen ships with two online spreadsheets code samples. Online spreadsheets are, as the name suggests, a way to manipulate spreadsheets with just a web browser.
Online spreadsheets is a code sample that integrates ASP.NET, web technologies and xlsgen. It can be found in the xlsgen install package, in subdirectory /samples/C#/ASP.NET 2.0 online spreadsheet
. With this code sample, you can create, edit, calculate and save arbitrary spreadsheets with just a web browser.
If you are looking for a way to avoid typical desktop deployment problems, the online spreadsheets is a great solution. Of course, the code sample has limited features, it concentrates on cells themselves, it does not handle charts, pivot tables and so on. The online spreadsheet itself is just HTML, there is no Java applet, ActiveX control or Flash involved here.
The code sample is provided as is, and derives from a Codeproject article available here. (Credits to: Declan Bright)
Requirements for running the code sample (users) :
Requirements for installing the code sample (admins) :
Requirements for extending the code sample (developers) :
http://127.0.0.1/GridViewSpreadsheet.aspx
).
C:\sample.xls
, and click on Save & Close. The filepath is a filepath on the server machine, not on the user machine. Make sure the target folder is granted write permissions for that to work properly. In either case, a message displays if the save has succeeded.
C:\sample.xls
in order to open an existing spreadsheet.
It is possible to work with numbers (integers and doubles), dates and strings in cells.
By default, Excel 97-2003 spreadsheets are created/opened/saved. A line in the source code must be changed for the sample to be able to create Excel 2007 spreadsheets (i.e. whose internal file format is ZIP based).
By making trivial changes in the source code, you can increase the number of displayed rows and columns, change the spreadsheet theme among other things. You can even make substantial feature additions such as support for cell formattings, charts, ... (let ARsT Design know about it).
This other code sample, which is written in C#, hosted as an ASP.NET solution, and easily portable to other server-side environment, makes it possible to view the content of the spreadsheet, including all the formattings (cells, conditional formattings, charts, ...) with just a web browser.
This code sample can be found in the C# subfolder of the samples folder, titled "ASP.NET 2.0 spreadsheet viewer".
When you run the code on a server, you get a blank page with an "Open document" icon. This icon lets you open whatever spreadsheet of your choice, and then it displays. The page is split in two parts : on the left is the table of contents including all tabs, and all pages inside each tabs ; on the right is the actual page. Note that the links on the table of contents makes it possible to navigate any page of any tab.
xlsgen documentation. © ARsT Design all rights reserved.