I have multiple pie charts that's created using Charts.js. I have already built an Excel export to export the table from the HMTL page to Excel. Now, I would like to pass a few variables into excel and then create a pie chart from these variables, maybe using a macro. So, that when the user clicks the "Export to Excel" button everything is in the excel file. Is this even possible?
If not could I save the charts as images and insert them into the export as well as the other information?
As a simple answer, what I would say is to stick with the format that you are using to produce your report currently, only use XML instead of HTML.
How this would work is you should take take the report you have currently and on the second page turn that table into a chart in excel. You can then go to excel's options and save it as an XML document. Open that document in any editor and you will need to reverse engineer it to build your XML formatted response from your page.
See here as a starting point: http://msdn.microsoft.com/en-us/library/office/aa203722(v=office.11).aspx
Edit
The XML method won't work. Just reread the page and it specifically says:
The following Excel features cannot be persisted in XML:
Charts, OLE Objects...
So for an actual chart you will need to use a predesigned excel sheet. What you would do with this is create an excel sheet using the same table format you would be producing on the page. Then design the chart based on the columns you intend to use.
You can then insert into this file, save it to the server and subsequently send it to the client for download. See here for info on how to do that: ASP Classsic - Insert into Excel .XLS columns or Create a Real Excel Format File.
Related
I want to import an excel sheet that contains data in subscript and superscript format. I want directly import the formula from Excel not by cropping as image. I am getting like this without any formating (a+b)2=a2+b2+2ab.
The application runs on the ASP.net framework and MS SQL database. Datatype for the column in SQL is nvarchar.
Appreciate if somebody can please help/guide me out of this issue.
Thank you!
If you view the Excel sheet and it looks like:
then what you are exporting is the string in the Formula Bar and not what you see in the cell. You need to modify the export to tell the destination app to display superscripting.
For example, if the destination app interprets HTML, then you should export:
(a+b)<sup>2</sup>=a<sup>2</sup>+b<sup>2</sup>+2ab
(its still a simple string, but the formatting instructions are part of the string)
If the destination app needs rtf, then a different format needs to be exported.
I have managed to create a data model, and in doing so import data variables and values from my googlespreadsheets (by clicking on 'import data from sheet'). My table is of the form:
table = {"age": {15,22}, "name": {"ted", "sally"}, "surname":{"anderson","medina"}}
I would like to have a table that uploads this on a page, and then I can click on each row which would then open up another page and I could edit the contents
I open a new page and drag a table in and link it to my data model. However, it only shows the variable titles and not the actual data. How can I get the data to automatically upload into the table?
I read alot of the tutorials but they all assume I want to start with only headers, and then manually input the data to create a data entry table. However, my table updates automatically in googlesheets, so I would like to import it to appmaker, and then have the ability to click on each row and add notes/edits. Any help would be greatly appreciated!! thanks
At this time App Maker doesn't support spreadsheets as data backend. You'll need first import all data to App Maker's models and then play with it in deployed application. You can find all pieces of the puzzle in Vendor Ratings template:
https://developers.google.com/appmaker/templates/vendor-rating/
Your actual data won't come up in your editor view, only when you preview it.
It seems to me that you could make this using an embedded Google sheet in your page.
Ex:
-drag an html block on the page
-set the content to something like:
<iframe src="[link to your google sheet]" height="1380" width="1100"></iframe>
*get the embed link from 'Publish to the Web'
Hope that helps, it might not be what you're looking for.
I'm a new beginner in Microsoft AX. I have a problem in AX 2009. I create a Table ImportFile with 2 Fields,("FileName-->Typ:String", "FileDocuValue-->Typ:Container"). When the User import a CSV-File it will be save in the Table ImportFile.
Now in EP I Just show in My GridView a Column FileName and I want that FileName be a Link so that when I click in one one these Names that it Open the Corresponding CSV-File in Excel.
Is it possible to do it?
I can suggest the following approach:
You can use a standard asp LinkButton control to display a link. When the link has been clicked,
Create a temporary CSV file from the data in your ImportFile table.
Create a URL to the generated CSV file (you can use the WebLink.url method).
Open the generated URL.
When I was working on a similar task (generate and download PDF) I also had to modify some standard classes such as WebSession and EPDocuGetWebLet.
A stored proc (SQL Server 2008) returns multiple result sets.
An Excel (.xls) file with custom formatting - not a generic workbook, not a spreadsheet built on the fly - has particular cells on particular
worksheets where I need to correctly "paste" each appropriate result set
from the stored proc. The worksheets designated for holding data need to
receive the data, and then other worksheets in the workbook will display the data
with a high degree of formatting and with charts.
For example:
result set 1 needs to be pasted in a worksheet named 'data01'
and beginning at cell B2;
result set 2 needs to be pasted 'data01'
and beginning at cell K2;
result set 3 needs to be pasted in a worksheet named 'data02'
and beginning at cell B2...
What are some approaches for tackling this problem
in a .NET environment? I have not found examples
or lessons which duplicate this scenario.
Update:
Essentially I'm wondering if it's possible to do what
SpreadsheetGear does with an excel template, without
having to pay thousands for a third party tool.
http://www.spreadsheetgear.com/support/samples/excel.aspx
Importing and Exporting Data by Using the SQL Server Import and Export Wizard
Exporting SQL Server Data to Excel (SQL Server Video)
On Zach Hunter's blog,
http://zachhunter.net/
he has a number of posts on how to make user of NPOI.
http://npoi.codeplex.com/
In particular, these two articles were invaluable:
"Use NPOI to populate an Excel template"
http://www.zachhunter.net/2010/05/npoi-excel-template/
"Improved NPOI ExportToExcel Function"
http://www.zachhunter.net/2010/06/improved-npoi-exportdatatabletoexcel-function/
in my application i want to get the data of a excel which is in a folder in solution explorer. i want to get the data and insert into a gridview. expecailly i want a particular colunm in that excel sheet that is i want to show in a gridview for example i set a outlook contact in a excel sheet in that sheet i want only a emailaddress column in a grid view how can i write. thank you
You can use ADO.net to access cells in an excel file, similar to a DB query. This is a bit lighter than trying to use Excel automation objects.
http://support.microsoft.com/kb/316934
You can then use this as a source for your gridview.