Subscript and Superscript format data uploaded in Excel not showing - asp.net

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.

Related

How to download a table of internet that if the copies in excel it is entered all in a single box?

When I try to import tables from certain web pages. The Excel function to import tables from the web, you can not. These tables when copied and paste, are usually pasted into a single Excel cell.
I would like to know if there is any solution for this, either from Excel or from R.
You could use a website to convert the html table to .csv then import the .csv in excel.
Just search on google for html table to csv. Here is an example: Html to csv.
With Excel you can import data from Web pages if you click on Data > From Web.
Then you copy/paste the url where your table is and you choose which table you want to import.
See this video for more details : https://www.youtube.com/watch?v=FZSR8DA01jQ
This assumes your Excel version is 2010 or more recent.

Accessing imported data in google appmaker

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.

Export pie chart from ASP Classic to excel

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.

Can I copy all tables from a URL?

My task is to copy tables from a public domain and format it later in Word. I have created a software where I just have to enter two values and the table is displayed to me on a web page. Then I have to copy this table into Word.
I was wondering if there was an easier way to achieve this....
I would even like to know if it is possible to store all the values I type to a TXT file or Excel sheet and programmatically copy the displayed web pages to Word.
Please help me and don't down-vote.....
Okay here are the detailed steps:
Open a webpage
Fill in a form with 4 fields
A new webpage opens based on what input you provide
Copy 2 tables from that webpage
Paste the 2 tables in MS Word 2007
Open browser again and go back to previous page
Enter new values in the webpage
Repeat all the steps
P.S There are more than 700 tables to be copied each week
I'm not sure this is what you need...anyway...
If you download the page (programmatically of course) you can parse it as XML (I assume it's a well-formed XML file otherwise you may have to use some dirty trick to find all tables). Then you can put all data on Word (by automation, you can even do all these stuffs from a Word macro, just download the HTML file, "parse" it to find tables and paste that text as HTML).
I would provide some example but it can't really be language-agnostic.

fill a custom excel template from sql server proc with multiple result sets?

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/

Resources