Tag: csv

Select on .csv file stops working after columns 1 and 2

I have the following line in a .csv file: 1234;Einkauf;26.08.2015;137873;616005;50308;Hiag;4100000;Place Rd. 8, 9999 Ort, HST;;;Test Place Rd. Ort;2000;VSM80;185.05;12;155.55;0.02 I run the following code: Set cn = CreateObject(“ADODB.Connection”) Set rs = CreateObject(“ADODB.Recordset”) cn.Open “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” & strPath & “;Extended Properties=””text;HDR=Yes;FMT=Delimited””;” sQuery = vbNullString sQuery = sQuery & “SELECT * FROM ” & strFileName sQuery = sQuery […]

Converting CSV to XLSX using openpyxl, but quote comes infront of numbers

I tried to convert CSV to xlsx using openpyxl. The conversion was successful but i noticed quote (‘) in-front of numbers. Making it string instead of numbers. As I am new to python you help would be grateful. Here is code I am using: import os import glob import csv import openpyxl for csvfile in […]

funny format when copy from CSV

I used python to write some text to csv but it is stored in funny format. output data is saved here:example data for example, it is read as the below in csv excel text shown in CSV when i copy it to other platforms(notepad, word, web application) it turns into something else after copy I […]

How to search an xlsx file for a specific string using Python (and perhaps openpyxl)

How can I search an xlsx file for a specific string variable? Example: ORIGINAL TEXT FILE: one – a b c two – a b c three – a b c four – a b c five – a b c XLSX FILE: two three five OUTPUT CSV FILE: The following in two columns: two […]

Remove Unicode characters from CSV files

The company I work for utilizes a MySQL database for most of its operations. Each week our vendors send us an update file in CSV format. We upload the file through our CRM software and it goes through and updates the records in our database. Ideally this works and everything finishes. It rarely is that […]

Button to Save Excel range of cells (not manually selected, but automatically detected) as “.csv” with same name as original “.xls” file

Here you have some information regarding my Excel file so you know better my worksheet layout: it is a normal excel sheet (.xlsx) which starts at row 5 and has many different entries for a table. Some of this entries are automatically calculated from a function which uses values from cells from the same row. […]

Why do I get “Compile error: Variable not defined” for a constant?

The following code imports/updates a summarysheet in a workbook with csv files from a fixed folder. I have divided the code in multiple subs: One for importing the csv-files, one for deleting the summarysheet, when importing again and one for mergin the imported csv files. I have declared the folderpath as a constant. Why do […]

Ruby – Write Data to Existing .xlsx Document

I have an existing xlsx file that I am trying to write data to programatically. Is there any modern solution to this for ruby? Also looked into the Google Sheets API but it’s only Java and .Net. I’ve searched quite a bit, and so far have checked out the following gems with no luck: https://github.com/roo-rb/roo […]

Why is my csv writer writing in columns not rows?

My csv writer is writing in columns not rows am I doing something wrong? Python 3.5 code: def create_csv(finished_file): csv_data = [] header = [“Parcel Number”] csv_data.append(header) csv_data.append(parcel_codes) resultFile = open(finished_file+”.csv”,’w+’) wr = csv.writer(resultFile) wr.writerows(csv_data) resultFile.close() It was working before – I did upgrade to excel 2016 but that should not make a difference. And […]

Replace comma with semi-colon in only 3 columns with VBA within .csv file

Let me see if I can try this again. I have a CSV file. It stands for comma separated value, which is a file format. In this file, there are several columns of varied data in each cell below. If I open the CSV file in Notepad, each “cell” is separated by a comma, hence […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.