xls

Combine multiple csv files into a single xls workbook Python 3

两盒软妹~` 提交于 2021-02-18 06:49:10
问题 We are in the transition at work from python 2.7 to python 3.5. It's a company wide change and most of our current scripts were written in 2.7 and no additional libraries. I've taken advantage of the Anaconda distro we are using and have already change most of our scripts over using the 2to3 module or completely rewriting them. I am stuck on one piece of code though, which I did not write and the original author is not here. He also did not supply comments so I can only guess at the whole of

Mapping of Apache POI HSSF/XSSF to XLS/XLSX

你说的曾经没有我的故事 提交于 2021-02-16 20:33:15
问题 Apache POI 4.x here. I see there are two types of Workbook implementations: HSSF Workbook XSSF Workbook I need to write a Java 8 app that reads Excel sheets with either " .xls " (XLS) or " .xlsx " (XLSX) extensions. Meaning, Excel files that were saved in the "old" (pre 2003) format, or the newer one. Is it safe to assume I use HSSF for XLS files, and XSSF for XLSX files? Or is the mapping logic a little bit more complicated there? This answer seems to indicate I'm correct, but that doesn't

Intent to read both .xls and xlsx files in Android?

被刻印的时光 ゝ 提交于 2021-02-11 15:15:49
问题 My intent picks .xls while fileintent.setType("application/vnd.ms-excel"); Picks .xlsx while fileintent.setType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); How to make both .xls and .xlsx selectable and readable? Appreciate help! 回答1: For .xls and .xlsx extensions, Mimetypes are clubbed. Intent intent; String[] mimetypes = { "application/vnd.ms-excel", // .xls "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" // .xlsx }; intent = new Intent(Intent

R read_excel: libxls error: Unable to parse file

和自甴很熟 提交于 2021-02-11 14:31:18
问题 I'm trying to read xls file into R using readxl::read_excel , but it's giving the following errors: Error: filepath: //.../data.xls libxls error: Unable to parse file also tried readxl::excel_sheets(), but same errors. readxl::format_from_ext(path) gives "xls" Also tried re-installing readxl packages, didn't work for me. My current alternative is to convert this file to "xlsx" using Excel and then read in with readxl::read_excel, but I would like to import the "xls" directly. How to fix it?

R read_excel: libxls error: Unable to parse file

放肆的年华 提交于 2021-02-11 14:29:55
问题 I'm trying to read xls file into R using readxl::read_excel , but it's giving the following errors: Error: filepath: //.../data.xls libxls error: Unable to parse file also tried readxl::excel_sheets(), but same errors. readxl::format_from_ext(path) gives "xls" Also tried re-installing readxl packages, didn't work for me. My current alternative is to convert this file to "xlsx" using Excel and then read in with readxl::read_excel, but I would like to import the "xls" directly. How to fix it?

Reading an Excel file into an R dataframe from a zipped folder

馋奶兔 提交于 2021-02-10 07:45:30
问题 I have an Excel file (.xls extension) that is inside a zipped folder that I would like to read as a dataframe into R. I loaded the gdata library and set up my working directory to the folder that houses the zipped folder. When I type in the following syntax: data_frame1 <- read.xls( unz("./Data/Project1.zip","schools.xls")) I get the following error messages: Error in path.expand(xls) : invalid 'path' argument Error in file.exists(tfn) : invalid 'file' argument I'm guessing that I'm missing

readxl::read_xls returns “libxls error: Unable to open file”

。_饼干妹妹 提交于 2021-02-08 14:16:40
问题 I have multiple .xls (~100MB) files from which I would like to load multiple sheets (from each) into R as a dataframe. I have tried various functions, such as xlsx::xlsx2 and XLConnect::readWorksheetFromFile , both of which always run for a very long time (>15 mins) and never finish and I have to force-quit RStudio to keep working. I also tried gdata::read.xls , which does finish, but it takes more than 3 minutes per one sheet and it cannot extract multiple sheets at once (which would be very

readxl::read_xls returns “libxls error: Unable to open file”

北城以北 提交于 2021-02-08 14:12:34
问题 I have multiple .xls (~100MB) files from which I would like to load multiple sheets (from each) into R as a dataframe. I have tried various functions, such as xlsx::xlsx2 and XLConnect::readWorksheetFromFile , both of which always run for a very long time (>15 mins) and never finish and I have to force-quit RStudio to keep working. I also tried gdata::read.xls , which does finish, but it takes more than 3 minutes per one sheet and it cannot extract multiple sheets at once (which would be very

convert xls to json in python

ε祈祈猫儿з 提交于 2021-02-08 11:45:24
问题 I am trying to convert xls to json and but when I am executing the code it's not giving me the data inside xls sheet, it's only giving me the json structure. Below is the code which I am running, I am not able to understand what modification I should further make in this so that I can get a perfect json file. Please note - input is in the form of binary stream and output is also in the form of a stream and not file. #!/usr/bin/python -u import sys import xlrd import simplejson from

How to programmatically sign a binary MS office document with Java?

浪子不回头ぞ 提交于 2020-12-27 07:16:53
问题 How can we digitally sign a legacy binary MS-Office document (doc, xls, ppt) in Apache POI, or any other open source library? The Open XML formats are covered at How to programatically sign an MS office XML document with Java? 回答1: I was able to sign .doc file by creating detached xml signature, then adding it under root directory using POIFSFileSystem, example is below : public class OfficeDocumentSigner2 { public static void main(String[] args) { signClassicOfficeDocuments(); } private