xls

R Linux Shell convert multi-sheet xls to csv in batch

不打扰是莪最后的温柔 提交于 2019-12-02 00:50:22
问题 In R i have a script gets content of multiple xls files <Loop over directory to get Excel content>. All files are about 2 MB. The script takes a few seconds for 3 files, but is now running for 6 hours on a Debian i7 system without results on 120 files. A better solution is therefore [hopefully] to convert all xls files to csv using ssconvert, using a bash script <Linux Shell Script For Each File in a Directory Grab the filename and execute a program>: for f in *.xls ; do xls2csv "$f" "${f%

How to convert .xls to .pdf via PHP?

北城以北 提交于 2019-12-02 00:49:58
I was googling many hours but I haven't got solution yet. I need to convert .xls file into .pdf file. How to do that? I have found this http://www.aspose.com/ , but it seems, that it hasn't got PHP API, only .NET and JAVA. Thanks for every advice... PHPExcel will do it directly (read XLS, output PDF), although the results are not very pretty. A better solution might be to use PHPExcel to read the XLS file, render it to HTML in your code & style it the way you like it, then use an HTML->PDF converter like DOMPDF (that's the only one I've tried; there are others) to convert to PDF. Or, if you

R Linux Shell convert multi-sheet xls to csv in batch

烈酒焚心 提交于 2019-12-01 20:51:36
In R i have a script gets content of multiple xls files < Loop over directory to get Excel content >. All files are about 2 MB. The script takes a few seconds for 3 files, but is now running for 6 hours on a Debian i7 system without results on 120 files. A better solution is therefore [hopefully] to convert all xls files to csv using ssconvert, using a bash script < Linux Shell Script For Each File in a Directory Grab the filename and execute a program >: for f in *.xls ; do xls2csv "$f" "${f%.xls}.csv" ; done This script does the job, however my content is in sheet nr 14, whereas the csv

PHPExcel How to set a date in cell

跟風遠走 提交于 2019-12-01 19:10:39
I need to put a date in a cell, when I take a look to its format it looks like *14/03/01. The value I put is a simple string and for that reason when I get the calculated values ignores the date I entered because it compares in a calendar (well, a column with all the dates of the actual year) the date that I entered with the dates to set a proper value corresponding the date entered. Is there a way to put the format that Excel expects? MS Excel uses a timestamp value for dates, and then masks it for display purposes; not a formatted string. From 02types.php in the /Examples folder:

Railscasts Episode #362 - Exporting to Excel: How to avoid the warning message given by Excel 2010 when opening the file?

我与影子孤独终老i 提交于 2019-12-01 17:17:16
When using the example app from Ryan Bates' Railscasts Episode #362 about exporting to Excel ( https://github.com/railscasts/362-exporting-csv-and-excel ), I've noticed that Excel 2010 (which is on Windows) gives me a warning message when opening up the .xls file I've downloaded using the "Download as Excel" link. The warning reads: "The file you are trying to open ... is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?" I can open the file just fine when I

read.xls - read in variable-length list of sheets, with their names

时光怂恿深爱的人放手 提交于 2019-12-01 16:25:33
问题 Given several .xls files with varying number of sheets, I am reading them into R using read.xls from the gdata package. I have two related issues (solving the second issue should solve the first): It is unknown ahead of time how many sheets each .xls file will have, and in fact this value will vary from one file to the next. I need to capture the name of the sheet, which is relevant data Right now, to resolve (1), I am using try() and iterating over sheet numbers until I hit an error. How can

Apache POI set selected cell after xls document opens

♀尐吖头ヾ 提交于 2019-12-01 15:58:58
We have next situation: our system has data export in xls format, this is huge file with many rows and columns. And after user download and open document he see document scrolled to last column and last Spreadsheet tab. This is very annoying, better to set focus on first tab and first cell. I did simple test code to see how it works: public class SelectionTest { public static String file = "/usr/test/poi.test/src/main/resources/test"; @Test public void test() throws FileNotFoundException, IOException { HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(file)); HSSFSheet s = wb.getSheetAt(0

How to read the xls and xlsx files using c#

廉价感情. 提交于 2019-12-01 15:13:06
How to read the xls and xlsx files using c# with OpenXML format Without using the OLEDB connection . I am looking for Open XML format procedure. Below is the code in which I used the OLEDB preocedure. But I am looking for OpenXML format. public static DataTable ConvretExcelToDataTable(string FilePath) { string strConn = string.Empty; if (FilePath.Trim().EndsWith(".xlsx")) { strConn = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1\";", FilePath); } else if (FilePath.Trim().EndsWith(".xls")) { strConn = string.Format("Provider

Apache POI set selected cell after xls document opens

大城市里の小女人 提交于 2019-12-01 14:57:20
问题 We have next situation: our system has data export in xls format, this is huge file with many rows and columns. And after user download and open document he see document scrolled to last column and last Spreadsheet tab. This is very annoying, better to set focus on first tab and first cell. I did simple test code to see how it works: public class SelectionTest { public static String file = "/usr/test/poi.test/src/main/resources/test"; @Test public void test() throws FileNotFoundException,

How to read the xls and xlsx files using c#

风流意气都作罢 提交于 2019-12-01 14:04:23
问题 How to read the xls and xlsx files using c# with OpenXML format Without using the OLEDB connection . I am looking for Open XML format procedure. Below is the code in which I used the OLEDB preocedure. But I am looking for OpenXML format. public static DataTable ConvretExcelToDataTable(string FilePath) { string strConn = string.Empty; if (FilePath.Trim().EndsWith(".xlsx")) { strConn = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=\"Excel 12.0 Xml;HDR=YES