import-from-excel

Convert the FULL Excel date serial format to Unix timestamp

元气小坏坏 提交于 2019-11-27 03:59:51
问题 I've seen lots of references to converting the "date" portion of the Excel serial date format, but everyone seems to skip the "time" portion of it. Here is what I need to do: I have an Excel file I'm importing. PHP in use. I am encountering the Excel Date Serial format (dddddd.tttttt) and need to convert this to an entire Unix timestamp. I've tried a few different things, but am getting hung up on how to do this in a fluid motion. 回答1: Please use this formula to change from Excel date to Unix

Accessing Excel file from Sharepoint with R

馋奶兔 提交于 2019-11-27 03:52:57
问题 am trying to write an R script that will access an Excel file that is stored on my company's Sharepoint page so that I can make a few calculations and plot the results. I've tried various ways to do this (download.file, RCurl getURL(), gdata), but I can't seem to figure out how to do this. The url is HTTPS and there should be a username and password required. I've gotten the closest with this code: require(RCurl) URL<-"https://companyname.sharepoint.com/sites/folder/_layouts/15/WopiFrame.aspx

Reading large excel file with PHP

故事扮演 提交于 2019-11-27 03:35:20
问题 I'm trying to read a 17MB excel file (2003) with PHPExcel1.7.3c, but it crushes already while loading the file, after exceeding the 120 seconds limit I have. Is there another library that can do it more efficiently? I have no need in styling, I only need it to support UTF8. Thanks for your help 回答1: Filesize isn't a good measure when using PHPExcel, it's more important to get some idea of the number of cells (rowsxcolumns) in each worksheet. If you have no need for styling, are you calling:

Excel date conversion using PHP Excel

不想你离开。 提交于 2019-11-27 01:02:54
i am reading date from excel which is in this format 12/5/2012 day/month/year using this code to read . using PHP EXCEL PHPExcel_Style_NumberFormat::toFormattedString($value['A'],'YYYY-MM-DD' ); its working like charm converting the above date '12/5/2012' to '2012-12-05' now the problem is if the date is lets says 18/5/2012 or you can say if i set day greater than 12 it gives me this date 18/5/2012 in this format 18/5/2012 after formating i tried this thing as well $temp = strtotime( PHPExcel_Style_NumberFormat::toFormattedString($value['A'],'YYYY-MM-DD' ); $actualdate = date('Y-m-d',$temp) ;

How do I read sheet two of an xlsx file with PHPExcel?

三世轮回 提交于 2019-11-27 00:23:16
问题 I know how to read my xlsx spreadsheet and loop through the first sheet. It has 5 sheets and I am having trouble getting to any other than the first. Here is the code I am using which was straight from the documentation. You can see I tried to utilize setActiveSheet, but that threw the error Call to undefined method PHPExcel::setActiveSheet() . Code : $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objReader->setReadDataOnly(true); $objPHPExcel = $objReader->load("cmt_school_data

Reading Excel file using node.js

会有一股神秘感。 提交于 2019-11-26 22:03:25
Okay so i am using the FileUploader module to upload my file from angular to my REST API : var uploader = $scope.uploader = new FileUploader({ url: api.getUrl('uploadCompetence',null) }); This is sent to the following POST function: router.route('/api/uploadCompetence') .post(function (req, res) { // This is where i want to read the file var competence = Competence.build(req.body.location); competence.add(function (success) { res.json({message: 'quote created!'}); }, function (err) { res.status(err).send(err); }); }) Now my goal is to read the excel file and then add each row to my database.

Help with a OleDB connection string for excel files

…衆ロ難τιáo~ 提交于 2019-11-26 20:26:40
The problem i'm having is that the data adapter is looking at only the first row in each column to determine the data type. In my case the first column "SKU" is numbers for the first 500 rows then I happen to have SKU's which are mixed numbers and letters. So what ends up happening is rows in the SKU column are left blank, but I still get the other information for each column row. I believe it is the connection string that controls that and with my current settings it should work, however it is not. Connection String: conn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:

Faster way to read Excel files to pandas dataframe

可紊 提交于 2019-11-26 20:21:17
I have a 14MB Excel file with five worksheets that I'm reading into a Pandas dataframe, and although the code below works, it takes 9 minutes! Does anyone have suggestions for speeding it up? import pandas as pd def OTT_read(xl,site_name): df = pd.read_excel(xl.io,site_name,skiprows=2,parse_dates=0,index_col=0, usecols=[0,1,2],header=None, names=['date_time','%s_depth'%site_name,'%s_temp'%site_name]) return df def make_OTT_df(FILEDIR,OTT_FILE): xl = pd.ExcelFile(FILEDIR + OTT_FILE) site_names = xl.sheet_names df_list = [OTT_read(xl,site_name) for site_name in site_names] return site_names,df

I need a workaround for Excel Guessing Data Types problem

蓝咒 提交于 2019-11-26 18:27:22
问题 I'm creating a utility to import data from Excel to Oracle database, I have a fixed template for the excel file, Now, when I'm trying to import the data by Jet provider and ADO.Net - Ole connection tools, I found the following problem: there're some columns haven't been imported because there are mixed data types in their columns [string and number], I looked for this problem on the internet I found the reason is guessing data types from Excel The load code: connection = new OleDbConnection(@

Text was truncated or one or more characters had no match in the target code page When importing from Excel file

馋奶兔 提交于 2019-11-26 16:06:37
问题 I have an excel file with four text columns: one of them is called ShortDescription which has the longest value. I created a table in SQL Server 2008 database, with four columns and the ShortDescription column type is set to NvarChar(Max). but when using the SSIS import and export dialog, I keep getting the mentioned error in the title, even when I set the OnTruncation option to Ignore. I tried to clear the column data, and it succeeded (so I made sure that the problem is in the