Open .sav file in excel after converting it to .csv online - excel

I am trying to process a data base, which is in .sav format, on excel.
I have converted sav to csv online: through http://pspp.benpfaff.org/ but I get csv text, not a file.
How can I import this into excel so that it reads it as columns? otherwise I have the text in commas.
Thank you!

I have found the easiest method after online conversion is to save the resulting text as a .txt file. From there you will open Excel-->File-->Import
If your data has headers you will select that option, but the main thing is to set the delimiter as comma and then hit finish. It should retain the data structure initially found in your SPSS file.

Related

Reading/Converting PIPE delimited txt file using VB.net

I have a pipe delimited file with an extension txt. I am using UiPath invoke code (basically I am using VB.net coding) to either read the file into a datatable variable. While Uipath has inbuilt activities to read CSV files, it doesn't work for many rows. I tried with few rows (about 10-20) and it works, but for about 1000-2000 rows, it gives me error that CSV file format in invalid. I am looking for a VB function to either convert the Pipe delimited txt file to a workbook xlsx file. Please help!
Thanks in advance!
It does not matter which file extention (TXT/CSV/...) it is. The steps to solve your issue are simple:
Use the Read CSV activity
Set the path of the file here
Here you set the Delimiter to your Pipe

When I save the CSV and edit it again the columns merged

I created a CSV file and I saved it as (CSV UTF8 Comma delimited) but I got message
Some features in your workbook might be lost if you save it as CSV UTF-8 (Comma delimited). Do you want to keep using the format?
I clicked Yes and save the CSV, then I open it again and doing edits when I save it no message appear. but when I open it again the columns merged in one column (as I think the comma removed by somehow!). So what is the issue here??
Before Save
After Save, close, then open it again
NOTE: I'm using Office 2016
Excel has some difficulty understanding how to merge complex codesets (English ASCII and Arabic UTF-8). You have to give it some help. This is not very fun.
We have an exported file csv (the c stands for comma, but really it can be another character)
Open Excel
Select Data - Import External Data - Import Data
Select the file type as csv
select your file
In the Import Wizard change the File origin as 65001 UTF (basically choose the language identifier you need)
Change the Delimiter to comma (or whatever you want to use)
Import
If you are using the save shortcut - use save as instead. I've found it's saving as unicode and you have to switch it to save as a CSV again.

Automatically convert csv file into Excel table?

I generate some csv files using a script. Next I manually convert those csv files into excel tables using the import wizard in excel based on:
https://www.youtube.com/watch?v=z5Pxil4jVO4
Is it possible to do this automatically - e.g. by calling an excel importer from command line - so I don't need to open excel and do all the manual work?
I can open the csv file directly in Excel but its not formatted as a table. E.g. this csv file:
a,b,c
a,b,c
results in this Excel sheet:
I would like each letter to be in a separate column.
I have looked at this:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/370ee470-f2cd-4f30-a167-b106dd51d47a/powershell-convert-csv-to-xlsx?forum=winserverpowershell
but its an awful lot of boiler plate code from create a simple table.
Add an extra line to your CSV file to tell Excel what the seperator is. Add the following line to the top of your CSV file:
sep=,
The easiest way, without close and edit your file - you can choose which separator you want in Excel 2010-2016 go to DATA, Text To Columns, choose Delimited, then choose your separator Comma (or other) and you will see changes immediately in the "Data preview", then click FInish.
Once you have the format you wanted, you simply save the document and it will be permanent.

Converting .csv file to text file using Excel macro

Would like to ask if how to convert a .csv file generated from macro to .txt file?
I have this Excel macro that gathers data from the website and create a table and output it to a .csv file, but for some reason I wasn't able to copy its contents to an existing .csv file as it returned special characters instead of the correct output.
Please help me, with the program I am currently doing.
A csv file is a text file. U can just change the extension like this
Name "C:\\**\\a.csv" As "C:\\**\\a.txt"

Excel xlsx file saving as CSV file - Korean and Japanese cracking badly

I am trying to make a CSV file from an Excel file. It has English, Korean and Japanese inputs. Right now it's saved as file.xlsx.
But when I try to save-as CSV through Excel as file.csv, all the Korean and Japanese inputs turn into question marks (???????)
I tried importing into Google Spreadsheets and exporting out as csv from there (from reading some other solutions) but it still turns into question marks.
I tried building a CSV file from scratch and just copying/pasting values from the Excel file into the CSV, but after I save it as CSV, the characters always crack.
Does anybody know how to work-around this? Thank you
I don't know that there IS an answer for this. CSV has no encoding, so it gets lost when you save in that format.
I tried, as a test, saving Chinese characters as a Unicode Text file, and believe it or not, that worked. So you may be able to do that, and simply change the filename to CSV. Assuming for some reason you NEED the filename to be CSV.
EDIT: I just ran addional testing on this. I was able to reimport the TXT file with either TXT or CSV extension, and the characters stayed just fine. So I think Unicode text is your answer.
Simply opening a CSV file in Excel only works when default assumptions hold. You may be writing the CSV correctly but not validating it properly.
It is more reliable to open a blank worksheet and then use Data Import. The encoding of the CSV file is one of the parameters you can specify.
To fully retain the characters while saving it on a CSV format and to somehow be able to import/re-use the data in the future.
You can follow these steps.
In Microsoft Excel, open the *.xlsx file.
Select Menu | Save As.
Enter any name for your file.
Under "Save as type," select Unicode Text.
Click Save.
Open your saved file in Microsoft Notepad.
Replace all tab characters with commas (",").
Select a tab character (select and copy the space between two column headers)
Open the "Find and Replace" window (Press Ctrl+H) and replace all tab characters with comma .
Click Save As.
Name the file, and change the Encoding: to UTF-8.
Change the file extension from .txt to .csv.
Click Save.
Open the .csv file in Excel to view your data.
Had the same issue. the below article shows the workaround in details:
https://help.salesforce.com/articleView?id=000003837&type=1
However, i decided to go with LibreOffice Calc, as it requires less steps to achieve the desired outcome. While exporting, you get to select charecter set, field delimiter and text decimeter.
For all other tasks, i prefer Excel.
Download and install Unicode CSV Addin for excel.
Save the csv from the new "Unicode CSV" menu as shown in picture
below.

Resources