xls

Convert Excel document (xls) to a plist

拥有回忆 提交于 2019-11-28 03:29:32
I have a pretty straightforward Excel spreadsheet, and I need to use the data in an iPhone app. The xls document has 6 columns, and > 200 rows. I would like to create a plist from the xls document. How can I convert one to the other, programmatically? I'm late to the party but I built a desktop utility that will convert CSV to a plist. You can download the binary or use this code, which requires cCSVParse . It uses whatever is in row 0 to create key names, then generates dictionaries for each successive row. CSVParser *parser = [CSVParser new]; [parser openFileWithPath:pathAsString];

returning decimal instead of string (POI jar)

孤者浪人 提交于 2019-11-28 02:18:51
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 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 numbers as numbers so they can use them) The class you're looking for is DataFormatter . Your code would be

CSVs to multi-sheet XLS without Excel installed. Powershell

六眼飞鱼酱① 提交于 2019-11-28 02:00:10
问题 I have a folder with multiple CSV files. I'd like to take all of them and make a XLS (or xlsx) with a sheet representing each CSV file. The key difference here is Excel is not installed and can't be. I understand I may be able to use the EPPlus library - http://epplus.codeplex.com/. I've also read of using the Access Database Engine - http://www.microsoft.com/en-us/download/details.aspx?id=13255 . I've gone through a number of different scripts for converting CSV to XLS in the traditional

Create excel without interop and template with or without row and columnspan

狂风中的少年 提交于 2019-11-28 01:39:15
Which dll or library can be used to create the excelsheet which is not of a particular format such that a template can be used in this context. While the rows and columns may be merged. Number of columns are not fixed. For example: In the first row column 1 and 2 are merged while in the second row the 2 rows of second column are merged. Say first row is containing 5 columns while the second row is of 4 columns. Interop is not desired as the system running the program may not have Microsoft office installed with it. Any suggestions would be a great helping. There are several options out there

Problem with PHPExcel

房东的猫 提交于 2019-11-28 00:31:20
I have a simple table: CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `email` varchar(225) NOT NULL DEFAULT '', `date` datetime DEFAULT NULL, `status` int(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM; I'm using PHPExcel to export tha table in XLS format. I wrote a simple PHP lines: $dbhost = "localhost"; $dbuser = "root"; $dbpass = ""; $dbname = "svn_register"; mysql_connect($dbhost,$dbuser,$dbpass); mysql_select_db($dbname); // require the PHPExcel file require 'Classes/PHPExcel.php'; // simple query $query = "SELECT * FROM users ORDER by id DESC";

jxl读取excel文件异常:Unable to recognize OLE stream 的解决方法

点点圈 提交于 2019-11-27 23:59:40
本文链接:https://blog.csdn.net/u011032676/article/details/50989465 问题成因 使用jxl方式读取,可能只能支持xls格式的文件,对于xlsx格式就不再支持 如果是从网站导出的excel文件,有的网站比较坑,导出的并不是标准格式的excel,而是将html改扩展名为xls的“伪”excel文件。当用excel打开这类文件时,会弹窗提示其“扩展名和文件类型不匹配”是否还要打开。 而且,使用文本编辑器打开,会发现这个所谓xls文件其实是xml标签的文件。 解决方法 在excel中打开,另存成xls就可以。 但当文件比较多时,可以使用excel vba批量另存。 第一种情况直接用vba批量另存即可,但第二种略有麻烦,因为会有报错弹窗,vba运行时会报错。 下面以第二种情况为例详细说明解决步骤。 首先,需要禁止excel的报错弹窗,否则使用vba批量另存时会出错。方法如下: 1、开始 -> 运行 -> 输入regedit -> 确定 2、找到注册表子项 HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security 3、在右侧空白处点击鼠标右键,选择“新建 -> DWORD值(D)”,输入"ExtensionHardening"点击确定。 4

Converting an CSV file to a JSON object in Java

耗尽温柔 提交于 2019-11-27 22:37:00
Is there an open source java library to convert a CSV (or XLS) file to a JSON object? I tried using json.cdl , but somehow it does not seem to work for large CSV strings. I'm trying to find something like http://www.cparker15.com/code/utilities/csv-to-json/ , but written in Java. You can use Open CSV to map CSV to a Java Bean, and then use JAXB to convert the Java Bean into a JSON object. http://opencsv.sourceforge.net/#javabean-integration http://jaxb.java.net/guide/Mapping_your_favorite_class.html Here is my Java program and hope somebody finds it useful. Format needs to be like this:

How to convert JSON to XLS in Python

橙三吉。 提交于 2019-11-27 22:15:22
问题 Does anyone know how can I convert JSON to XLS in Python? I know that it is possible to create xls files using the package xlwt in Python. What if I want convert a JSON data convert to XLS file directly? Is there a way to archive this? 回答1: I usually use tablib for this use. Its pretty simple to use: https://pypi.python.org/pypi/tablib/0.9.3 回答2: Using pandas (0.15.1) and openpyxl (1.8.6): import pandas pandas.read_json("input.json").to_excel("output.xlsx") 来源: https://stackoverflow.com

What is the best way to create XLS file in PHP

大憨熊 提交于 2019-11-27 21:14:06
I am currently trying to figure out the best way to create a .xls file from PHP. It seems like to me that all I need to do is change the header content type to "application/vnd.ms-excel", and then output data in a comma separated format. Is this the best way to do this? Thanks for any help! Metropolis EDIT Would it be bad to just output the data as HTML? I already have a class that I would like to extend for this problem, so I would prefer to stay away from a third party solution. I just need to know what the best way to output the data would be in order to get the most out of that file format

Direct downloading a xls file without writing it to the directory by Spreadsheet gem

孤街醉人 提交于 2019-11-27 20:18:12
问题 I am using this Spreadsheet gem to export xls file. I have the following codes in my controller: def export @data = Data.all book = Spreadsheet::Workbook.new sheet = book.create_worksheet :name => "data" contruct_body(sheet, @data) book.write "data.xls" end In this way, I can fill in the data and save it in the root directory. But I want to download it instead of save it. How could I modify the code so that the user prompted to select his local directory to save the file? (better if without