xls

Read only certain columns from xls

人走茶凉 提交于 2019-12-19 09:28:30
问题 I have an excel spreadsheet with several sheets. The format is as below: Date A B C D E F Reference Ref Date Half life 03/01/13 6.29 5.28 8.15 4.93 11.67 6.4 8.88 01/01/99 30.23 04/01/13 6.39 5.39 8.22 5.04 11.75 6.4 07/01/13 6.34 5.32 8.17 4.92 11.82 6.4 08/01/13 6.33 5.3 8.16 4.96 11.68 6.4 09/01/13 6.29 5.29 8.13 4.93 11.73 6.4 10/01/13 6.29 5.32 8.17 4.95 11.61 6.4 11/01/13 6.21 5.27 8.12 4.95 11.57 6.4 14/01/13 6.28 5.28 8.09 4.92 11.65 6.4 15/01/13 6.25 5.26 8.06 4.9 11.59 6.4 16/01/13

How to convert csv to xls using R?

跟風遠走 提交于 2019-12-19 04:07:50
问题 I have a folder with few hundred CSV files. What would be the easiest way to convert these to XLS format using R? (Yes, I know CSV is Excel-compatible but I still have good reason to convert them.) 回答1: Use the package xlsReadWrite to export to xls: library(xlsReadWrite) filenames <- list.files("[path_name]", pattern="*.csv", full.names=TRUE) for(i in 1:length(filenames)){ a <- read.csv(filenames[i]) write.xls(a, paste("file",i,".xls", sep="")) } 来源: https://stackoverflow.com/questions

python批量将csv文件转xls

穿精又带淫゛_ 提交于 2019-12-19 01:38:38
csv2xls源代码: import win32com.client as win32 import os.path import os def csv2xls(): rootdir = r"D:\poi\云南昆明" # 需要转换的xls文件存放处 rootdir1 = r"C:\Users\giser\Desktop\新建文件夹" files = os.listdir(rootdir) # 列出xls文件夹下的所有文件 num = len(files) # 列出所有文件的个数 for i in range(num): # 按文件个数执行次数 kname = os.path.splitext(files[i])[1] # 分离文件名与扩展名,返回(f_name, Nname = os.path.splitext(files[i])[0] if kname == '.csv': fname = rootdir + '\\' + files[i] # 合成需要转换的路径与文件名 fname1 = rootdir1 + '\\' + Nname # excel = win32.gencache.EnsureDispatch('Excel.Application') # 调用win32 wb = excel.Workbooks.Open(fname) # 打开需要转换的文件 wb

How can I modify an existing Excel workbook with Perl?

此生再无相见时 提交于 2019-12-18 16:18:55
问题 With Spreadsheet::WriteExcel, I can create a new workbook, but what if I want to open an existing book and modify certain columns? How would I accomplish that? I could parse all of the data out of the sheet using Spreadsheet::ParseExcel then write it back with new values in certain rows/columns using Spreadsheet::WriteExcel, however. Is there a module that already combines the two? Mainly I just want to open a .xls , overwrite certain rows/columns, and save it. 回答1: Spreadsheet::ParseExcel

Convert XLS to CSV on the server in Node

强颜欢笑 提交于 2019-12-18 11:54:04
问题 I have a client-side web application, with a very minimal node server to access some data that the client can't. One of these things is excel spreadsheets with .xls extensions. I'm trying to get my server set up to download the xls, convert it to csv, and then send it back to the client. I've got the download part done, and I'm sure I can figure out the "send back" part, but I can't for the life of me find a good library to convert from xls to csv. Can someone point me to a library that can

CSV Import Library for CodeIgniter [closed]

戏子无情 提交于 2019-12-17 18:23:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Need to implement csv or xls import into Application created using CodeIgniter. Is there any library for this? Any suggestion appreciated. 回答1: Here is an easy way to do this. I don't know what people do but i use this This is my csv reader library <?php if (!defined('BASEPATH')) exit('No direct script access

.NET Excel Library that can read/write .xls files [closed]

筅森魡賤 提交于 2019-12-17 17:29:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm looking for an Excel library which reads/writes .xls (not .xlsx) files. I'm using excellibrary but it's very buggy and I can't

returning decimal instead of string (POI jar)

牧云@^-^@ 提交于 2019-12-17 17:12:16
问题 I need to read xls or xlsx sheet. successfully I read the sheet, but it returning decimal value instead of string (eg: for 3 -- it is returning 3.0). I need to read the cell values as it is. so I need to return as string 回答1: POI is giving you the exact value that Excel has stored in the File. Generally, if you write a number in an Excel cell, Excel will store that as a number with formatting. POI provides support to do that formatting for you if you want it (most people don't - they want the

How to convert Excel XLS to CSV using PHP

ⅰ亾dé卋堺 提交于 2019-12-17 07:30:20
问题 Can anyone guide me how to convert XLS to CSV using PHP? I have excel spread sheet which contains a list of documents, I want to convert this with CSV format using PHP. 回答1: Probably you can start reading a XLS using PHP. Then, using the main logic to output what you want (csv in your case). Good luck, 回答2: This will surely work, require_once 'Classes/PHPExcel/IOFactory.php'; $inputFileType = 'Excel5'; $inputFileName = 'YOUR_EXCEL_FILE_PATH'; $objReader = PHPExcel_IOFactory::createReader(

xls to csv converter

旧街凉风 提交于 2019-12-17 03:52:21
问题 I am using win32.client in python for converting my .xlsx and .xls file into a .csv. When I execute this code it's giving an error. My code is: def convertXLS2CSV(aFile): '''converts a MS Excel file to csv w/ the same name in the same directory''' print "------ beginning to convert XLS to CSV ------" try: import win32com.client, os from win32com.client import constants as c excel = win32com.client.Dispatch('Excel.Application') fileDir, fileName = os.path.split(aFile) nameOnly = os.path