Excel viewer lib - javascript

I'd like to allow users to view Microsoft Excel files by browser and choose data from it's sheets for further manipulation. How to do it?
I tried http://oss.sheetjs.com/ but showing data is not working for sheets with a lot of number data and merged cells, for example for this file: http://stat.gov.pl/download/gfx/portalinformacyjny/pl/defaultaktualnosci/5502/11/13/1/wyniki_finansowe_podmiotow_gospodarczych_1-6m_2015.xlsx

Have you tired http://viewerjs.org?
You will need to save your excel file as ODP. You can do this by save-as the excel as "OpenDocument Format".

Related

how to create excel file from HTML

There are too many examples how to create EXCEL file, like this:
create Excel with xPages
But I really need Excel xlsx format not xls. Just defining xlsx file extension and change content type doesn't help:
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
Vlad,
Setting the content type to xls or xlsx has the same effect: it tells the browser to hand over to Excel. It still would send HTML that excel renders.
It is up to the user to save as xlsx.
If you really need a ready made xlsx you need to create an XAgent that renders the binary xlsx format. The easiest way is Apache POI library, which is available for XPages through OpenNTF.
Check the samples there. They should do what you need.

How to download .csv data in multiple excel sheets using java script?

How to download .csv data in multiple excel sheets using java script.
data1={"a":"shri","b"="Om"} should be downloaded in First sheet and
data1={"a":"Rahul","b"="Ajay"} should be downloaded in Second sheet and
there is N:N relations between objects and sheets. It means number of objects equal to number of sheets. Is there any way to create multiple sheets in java script ?
`exportCsvTXLS(){
//here is my conversion logic to put into multiple excel sheet
}`
if you have answer using angular js then it is fine as well.
just I want to import multiple objects in multiple sheets.
I never create Excel file directly in javascript.
You can send your data to your server and you build your Excel file from it. For example, your have an array of object in JSON, then you parse your JSON and build each sheet based on the objects in the array.
The result of the of the query must be the file generated which enable the user to download it.
It will probably be easier to create your Excel file from Java or C# than in Javascript.

Proper way to export HTML table as Excel file?

What's the correct way to export an HTML table as an Excel file so that the user can click a button and download the Excel file (ideally using Angular and without using server)?
I've seen many answers like this:
Export to xls using angularjs but doing this gives an error similar to the following:
"The file format and extension dont match... The file could be corrupted..."
and I believe the file is actually in HTML or XML format, not actual Excel.
The warning does not present a good image to the user.
What's the right way to actually export a file as Excel without using the server?
Or is the server required to create the file?
If you are just using tabular data, then I would argue that the best solution would be building a CSV file. This could be natively opened by excel and converted into an XLS file if necessary. You can do so by arranging your data with a data URI. The octet-stream will force a file download rather than opening in browser. Here is an example:
CSV

Excel to PDF conversion in PHP

It is asked to me to do a small excel to pdf conversion.
Let me describe what is exactly to be done.
in excel file there are list of companies which looks like this...
and to retrieve a company name turn into this in PDF format, like this...
I am thinking to follow a path...
1-using php and js I will get excel file with "input type=file"
2-using pdf reader php script I will retrieve the data required.
After this I am confusing...
3-I can retrieve data by searching and parsing a company name( for example getting an input: "company:A") till next keyword of "company" for all columns
or should I put all data from excel into CSV file and do the parsing part there???
4- after that, I am thinking to use, one of the tcpdf example methodologies however here comes another confusing point for me... because I don't know which type of output should get from excel or csv and load into pdf converter method.
An enlightening path would be appreciated since I am confused
Regards
Build your Data on HTML format first then if you got the correct display on html then you can now convert it to a PDF file.

How to export a .xls file from a website as a CSV file?

I am trying to export self updating .xls file from other website to mine as csv, so that I will be able to create "Live data graphs" using Highcharts JS for different parameters from this , which also update automatically according to the file.
OR
I have another method, same self updating data is on a website in form of table which gets updated with time. So , is it possilble to pull data from there for specific parameters and generate live data graphs?
Please Help.....
How about using a Google spreadsheet?
http://dataist.wordpress.com/2012/11/23/using-google-spreadsheet-as-a-database/
If I got you right, you want to convert an .xls file to .csv ?
Then you'll want to look at this article:
http://www.c-sharpcorner.com/uploadfile/yuanwang200409/how-to-convert-xls-file-into-csv-file-in-c-sharp/
As well as consider some answers on SO:
Is there any simple way to convert .xls file to .csv file? (Excel)
C# converting .xls to .csv without Excel
Personally I like the solution to extract .xls into dataset and then generate you .csv from datatble. (see c# datatable to csv)

Categories

Resources