import-from-excel

Python: Import excel file using relative path

懵懂的女人 提交于 2020-01-06 06:10:15
问题 I tried to import an excel file which is not within the same folder than the script. I need to get one folder above, then into another folder (B_folder) and there is file 2_file.xlsx I tried: df = pd.read_excel(r'..\B_folder\2_file.xlsx') and got: FileNotFoundError: [Errno 2] No such file or directory: '..\\B_folder\\2_file.xlsx' also tried: foreslash instead of backslash without the 'r' before path but I always get the error message above or this one: OSError: [Errno 22] Invalid argument: '.

import data from excel 2003 to dataTable

怎甘沉沦 提交于 2020-01-04 13:45:55
问题 I am importing excel worksheets to a datagridview using the following code: Private Sub Browsimportbtn_Click(sender As Object, e As EventArgs) Handles Browsimportbtn.Click Dim textpath As String Dim textpath1 As String Dim opf As New OpenFileDialog If opf.ShowDialog = 1 Then textpath = opf.FileName textpath1 = opf.SafeFileName textpath1 = textpath1.Remove(textpath1.Length -4,4) Dim cnexcell As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & textpath & "; Extended

Import tool Excel CSV

試著忘記壹切 提交于 2020-01-02 09:19:12
问题 I need an import tools for a web app. I've been looking around and found some, just not sure about their stability. I'm using the Zend Framework for part of the project and was hoping I could find an import tool there, since I already have the framework, but couldn't see one...am I looking in the wrong place? I would like the web users to be able to import csv, excel files into a mysql database. I'd like the tool to allow the users to select the columns of the spreadsheet/csv to match up to

Change Base 1 Array to Base 0 Array

£可爱£侵袭症+ 提交于 2020-01-02 02:00:09
问题 I'm retrieving data from Excel and would like to keep my arrays 0 based but Excel returns 1 base. Is there a fairly simple way to return change the array from 1 to 0 base? Or do I just need to create a loop? Here's an example code right here: dim oData(,) as object dim rng as range dim wks as worksheet = xlApp.Activeworkbook.sheets(Sheet1) rng=wks.Range("A1:B2") oData=rng.Value2 回答1: A loop is the simplest option. Dim target as string(0 to oData.Length - 1) For index = 1 to oData.Length

How to import Excel sheet data into my iphone App.

梦想与她 提交于 2020-01-01 11:49:30
问题 iam Working on a application where we can import contacts from facebook,linkedin,gmail etc,.. Same like i have an excel sheet with contact numbers and email Id's ,i need to import those contact numbers and email id's from Excel sheet. I have googled it like hell,found some answers saying that,save excel sheet in CSV format and you can parse it with CSV parser. So can any1 Please tell me Which is the best way to import those Excel Sheet data into my iphone App. Thanks in Advance. 回答1: There is

Import Excel data to DataGridView in Visual Studio 2010

喜欢而已 提交于 2019-12-30 10:56:09
问题 Please help to fix importing data from Excel document to DataGridView control with following code: private void button5_Click(object sender, EventArgs e) { Excel.Application app = new Microsoft.Office.Interop.Excel.Application(); Excel.Workbook workbook =app.Workbooks.Open(@"C:\Users\Admin\Desktop\Dropbox\Vandit's Folder\Internship\test.xlsx"); Excel.Worksheet worksheet = workbook.ActiveSheet; rcount = worksheet.UsedRange.Rows.Count; int i = 0; for(;i<rcount;i++) { dataGridView1.Rows[i].Cells

How to add file name when importing multiple Excel files to one Access table

对着背影说爱祢 提交于 2019-12-24 09:48:27
问题 I am using Access VBA to import multiple Excel files into my Access database. This will be a monthly process with 20-50 files and 10-60K records. I need to include an "Application name" that isn't included within the spreadsheet file itself, but is in its file name. Rather than manually adding the application name to the Excel file I'd like to have it added via my VBA code. I'm not proficient with Access and have pieced most of this together from searches on how to complete. This "works" but

Is there any way to get Roo to accept StringIO objects in place of files?

跟風遠走 提交于 2019-12-23 13:10:55
问题 I'm trying to write some unit tests which involves Roo reading Excel 2007 files. I have the Excel file in my unit test file as a hex string, which in turn is fed into a StringIO instance. I can't simply pass the StringIO object to Roo::Spreadsheet.open , since that function actually checks if the passed object is a File instance: def open(file, options = {}) file = File === file ? file.path : file # ... and if it isn't, proceeds to assume it's a string. Manually specifying the extension doesn

Missing Microsoft Excel as option in SQL Server data import tool

为君一笑 提交于 2019-12-23 12:15:55
问题 I'm running SQL Server 2012 on a 64bit Windows Server 2012 R2. I don't have MS Office installed. I now notice that when I start Start->Program Files->Microsoft SQL Server 2012->Import and Export Data (64-bit) the MS Excel file option is missing from the datasource dropdown. How can I get that option without having to install Excel or Office on my server? 回答1: Had to install this driver: https://www.microsoft.com/en-us/download/confirmation.aspx?id=13255 After that it works :) 来源: https:/

Encoding error while writing data from excelfile to database (mysql)

徘徊边缘 提交于 2019-12-22 19:47:04
问题 I get this error when writing to database: Encoding::UndefinedConversionError "\xD0" from ASCII-8BIT to UTF-8 After googling around a bit the problem seems to lie in ruby 1.9.2 string handling but no real solution found. I use magic_encoding to force utf-8 on all data. My database runs on utf-8 as well. I'm running rails 3.1 and ruby 1.9.2. Anyone that can shine some light on this error? 回答1: You should add this line to the top of your .rb file # encoding: utf-8 Or you can use this gem magic