import-from-excel

How to read empty cells in PHPExcel without skipping values?

拟墨画扇 提交于 2019-12-22 17:22:46
问题 I need your help to solve one problem. I tried to find answer, but I found none. I'm using PHPExcel 1.8.0 to read data from excel-file. And I'm using ReadFilter to read specific columns. Main PHP Code. $price = UPLOAD_DIR . $price; $file_type = PHPExcel_IOFactory::identify($price); $filter = new ShipperReadFilter(); $filter->getShipperSettings($shipper); $reader = PHPExcel_IOFactory::createReader($file_type)->setReadDataOnly(true)->setReadFilter($filter)->load($price); $worksheet = $reader-

Could not load file or assembly 'Office, Version=15.0.0.0'

こ雲淡風輕ζ 提交于 2019-12-22 03:48:38
问题 I use Vs2013. I have created application in which I use Excel file as an input and get contact from the file. Everything is working in my computer. I have Vs2013. Windows 8.1, Ms office 2007 & 2013. When I run my application in any other computer, it throws Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bc111e9429c' or one of its dependencies. The system cannot find the file specified As per my application requirement, I need to use Excel file

Import CSV, exclude first row

痴心易碎 提交于 2019-12-21 20:27:06
问题 I'm importing my csv fine now except one thing, how do i get the import to ignore the data in the first row? Employees will be uploading the same format which has the column names in that first row. if (isset($_POST['submit'])) { if (is_uploaded_file($_FILES['filename']['tmp_name'])) { echo "<h1>" . "File " . $_FILES['filename']['name'] . " uploaded successfully." . "</h1>"; echo "<h2>Displaying contents:</h2>"; readfile($_FILES['filename']['tmp_name']); } //Import uploaded file to Database

Generate table schema inspecting Excel(CSV) and import data

六月ゝ 毕业季﹏ 提交于 2019-12-18 16:52:21
问题 How would I go around creating a MYSQL table schema inspecting an Excel(or CSV) file. Are there any ready Python libraries for the task? Column headers would be sanitized to column names. Datatype would be estimated based on the contents of the spreadsheet column. When done, data would be loaded to the table. I have an Excel file of ~200 columns that I want to start normalizing. 回答1: Use the xlrd module; start here. [Disclaimer: I'm the author]. xlrd classifies cells into text, number, date,

How do I import an Excel spreadsheet into SQL Server 2008R2 database?

大憨熊 提交于 2019-12-17 22:02:59
问题 I have got huge list of contact information in an Excel sheet that I would like to turn into table in the database so that I can maintain them in the database. I tried following the import/export flat file import from the SQL Server 2008 R2, but it did not work. Can anyone tell me how do I successfully import the spreadsheet into a table in the database? Thanks 回答1: There is a microsoft knowledge base article that lays out all the ways this is possible. http://support.microsoft.com/kb/321686

Import and Export Excel - What is the best library? [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-17 02:25:19
问题 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 6 years ago . In one of our ASP.NET applications in C#, we take a certain data collection (SubSonic collection) and export it to Excel. We also want to import Excel files in a specific format. I'm looking for a library I can use for this purpose. Requirements: Excel 2007 files (Does Excel 2003 support over 64k rows? I need

How to selectively import an XLS into an SQL Server 2008 table?

馋奶兔 提交于 2019-12-13 06:29:40
问题 I have an XLS file. Let's assume that it has 1000 rows in all, with 10 columns. I would like to import rows 5 through 995 (say), and columns 1 though 7 and 10. How can I do this using an SQL query, either though OPENROWSET or BULK INSERT? I am using SQL Server 2008. 回答1: I had another idea. You could also use a Linked Server which connects to the Excel document. (This is probably an easier approach for you.) See: http://support.microsoft.com/kb/306397 回答2: I would approach this in a slightly

read xls, convert all dates into proper format, -> write to csv

删除回忆录丶 提交于 2019-12-13 00:24:37
问题 I'm reading excel files and writing them out as csv. A couple of columns contain dates which are formatted as float number in excel. All those fields need to get converted to a proper datetime (dd/mm/YY) before I wrote to CSV. I found some good articles on how that works in general, but struggling to get that working for all rows in a opened sheet at once. (Newbie in Python) Code looks like below for now: wb = xlrd.open_workbook(args.inname) xl_sheet = wb.sheet_by_index(0) print args.inname

Extract Data from Excel Spreadsheet into Database in Ruby

左心房为你撑大大i 提交于 2019-12-12 21:38:56
问题 I'm looking to extract quite a lot of data from spreadsheets for a Rails application, but I'm doing the extraction through the Rails Console. I have a table called instititutes in my database which currently has around 170 records. I've found far better data in a spreadsheet with c.1000 records and want to import that to my database, but to skip any records that match already. I thought that using the find_or_create_by method would be the best move for this. The spreadsheet has UKPRN and NAME

How to prevent `ssconvert` recalculating Excel file before conversion?

孤街醉人 提交于 2019-12-12 06:31:24
问题 I am trying to convert the .xlsx file http://www.eia.gov/forecasts/steo/archives/mar14_base.xlsx into a .csv, but it seems that the .xlsx contains formulae that link to a local file that I don't have (the creator of the file must have forgotten to paste as values instead of as formula) so each time I use ssconvert it tries to recalculate the formula, which fails hence I can't get the data: ssconvert --export-type=Gnumeric_stf:stf_assistant -O "locale=C format=automatic separator=, eol=unix