XLSX

Clash when exporting excel file using “xlsx” and “openxlsx” packages in R

假如想象 提交于 2019-12-25 09:34:19
问题 I have a data which has a size similar to "a" below library(openxlsx) a <- list() names(a) <- paste("sheet", seq_along(fulldata), sep="_") ### name for each sheet for (i in 1:172) { a[[i]] <- matrix(i,30,60) } write.xlsx(a, "a.xlsx") If I run the code above, few seconds later, R closes automatically. library(xlsx) options(java.parameters = "-Xmx4000m") a <- list() for (i in 1:172) { a[[i]] <- matrix(i,30,60) } n <- paste("sheet", seq_along(fulldata), sep="_") ### name for each sheet for (i in

read in online xlsx - sheet in R

拥有回忆 提交于 2019-12-25 07:52:24
问题 I have Trouble reading in this xlsx file and working with sheet=2 ( "Data") "http://www3.weforum.org/docs/gcr/2015-2016/GCI_Dataset_2006-2015.xlsx" what i did: library(readxl) library(XLConnect) library("openxlsx") temp = tempfile(fileext = ".xlsx") dataURL <- "http://www3.weforum.org/docs/gcr/2015-2016/GCI_Dataset_2006-2015.xlsx" download.file(dataURL, destfile=temp, mode='wb') file<- read.xlsx(temp, sheet= 2) I get the following: Error in .jcall("RJavaTools", "Ljava/lang/Object;",

Cell and Column on XLSX Apache Java

怎甘沉沦 提交于 2019-12-25 06:47:07
问题 I really have some problems with my code. Really appreciate it if any of you would help me. Below is my code and 2 screenshots of what it looks like and how it should looks like when the code is being executed. try { response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setHeader("Content-Disposition", "attachment; filename="+ ReportID + ".xlsx"); String excelFileName = "C:\\Test.xlsx"; XSSFWorkbook w = new XSSFWorkbook(); System.out.println("w

read an xslx file and convert to List

拜拜、爱过 提交于 2019-12-25 05:06:19
问题 I have a xslx file with following data www.url.com www.url.com www.url.com www.url.com www.url.com www.url.com www.url.com www.url.com ... Like you can see I have only 1 column used and a lot of rows. I need to read that column from the xslx file somehow and convert it to List<string> . Any help? Thanks! 回答1: You can use EPPlus, it's simple, something like this : var ep = new ExcelPackage(new FileInfo(excelFile)); var ws = ep.Workbook.Worksheets["Sheet1"]; var domains = new List<string>();

PHPExcel Force Download Issue

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 03:37:05
问题 I know this might have been asked in several pieces, but I could not find an exact answer to the issue. I am using PHPExcel to generate an Excel file (obviously), and the code works to generate the file, but not when I include the code for Force Download, it corrupts the file. My latest version of the script looks like this: function make_xls_spreadsheet(){ /** Error reporting */ error_reporting(E_ALL); /* Set the save path */ define('XLSX_SAVE_PATH', 'tmp/'); /** Include path **/ set_include

Parse xlsx file row by row into String[]

谁都会走 提交于 2019-12-25 03:14:09
问题 def Reader = new CSVReader(new FileReader("/Users/me/myfile.csv")); while ((row = Reader.readNext()) != null) { How can I do the above with the same format for an xlsx file. I've looked into some options like POI, but i'm not sure how to do exactly what I have above. The examples I saw seemed to require additional code for retrieving the value from a row. In my current case, with opencsv, i just get a row which is a String[] which I can then use like this value = row[index] 回答1: Xslx is a

Read and Edit Excel in GWT Client Code

本小妞迷上赌 提交于 2019-12-25 02:58:22
问题 I have a GWT application with server and client code. I want to read and display an Excel (.xslx) file from the user in the GUI without passing it to the server. Is it possible to do this with the Apache POI or can't GWT compile all needed code from POI? 回答1: On the client side you will only be able to use this packages: http://www.gwtproject.org/doc/latest/RefJreEmulation.html You have to pass the excel to the server 来源: https://stackoverflow.com/questions/29649868/read-and-edit-excel-in-gwt

Using VBA to open a tab delimited .txt file to save to .xlsx format

此生再无相见时 提交于 2019-12-25 02:39:30
问题 I'm trying to use VBA in Excel to automate turning a .txt file (tab delimited) into a .xlsx file instead. Here's what I have: Set WB = Workbooks.Open(folder + file, , , 1) If Right(file, 3) = "txt" Or Right(file, 3) = "xls" Then Application.DisplayAlerts = False WB.SaveAs filename:=folder + milestone + "_" + loadtype + "_" + Left(file, Len(file) - 4) + "_" + metricDate + "_.xlsx", _ FileFormat:=51 Application.DisplayAlerts = True Else Application.DisplayAlerts = False WB.SaveAs filename:

VBS - Loop through multiple .csv files in a folder and convert the files to .xlsx

邮差的信 提交于 2019-12-25 01:36:07
问题 I managed to get the following piece of code put together: 'Constants Const xlOpenXMLWorkbook = 51 '(without macro's in 2007-2016, xlsx) Const xlOpenXMLWorkbookMacroEnabled = 52 '(with or without macro's in 2007-2016, xlsm) Const xlExcel12 = 50 '(Excel Binary Workbook in 2007-2016 with or without macro's, xlsb) Const xlExcel8 =56 '(97-2003 format in Excel 2007-2016, xls) ' Extensions for old and new files strExcel = "xlsx" strCSV = "csv" ' Set up filesystem object for usage Set objFSO =

Python xlsx to csv without change date to interger

痴心易碎 提交于 2019-12-24 20:22:14
问题 I need to write a python script to change from .xlsx file to .csv file: my code : import xlrd import csv def csv_from_excel(): wb = xlrd.open_workbook("Book1.xlsx") sh = wb.sheet_by_name('Att1FF5.tmp') your_csv_file = open('your_csv_file.csv', 'wb') wr = csv.writer(your_csv_file, quoting=csv.QUOTE_ALL) for rownum in xrange(sh.nrows): wr.writerow([unicode(entry).encode("utf-8") for entry in sh.row_values(rownum)]) your_csv_file.close() csv_from_excel() However , all the date format was