I have a xls file which have data in csv format. I used "Tab" separator to open it manually.
But using macro multiple columns data opened in 1st column only, separator not working using macro.
If i renamed file to .csv then it correctly opened in multiple columns.
Please advise is there any way to open or load .xls file with separator or any way to rename/ change extention of file to .csv
[Solved] Load XLS file having tab separated data
-
- Posts: 22
- Joined: Fri Jun 17, 2022 9:45 am
[Solved] Load XLS file having tab separated data
Last edited by Lovepreet323 on Fri Nov 01, 2024 10:27 am, edited 2 times in total.
OpenOffice 4.0 on Windows 10
Re: How to load xls file having tab seperated data in calc using macro
XLS is not CSV and vice-versa
And since 2022 and the proposals made to you, you haven't been able to make any progress?
And since 2022 and the proposals made to you, you haven't been able to make any progress?
Co-admin french forum branch
Re: How to load xls file having tab seperated data in calc using macro
Here is a macro that should open a set file that is tab delimited
Code: Select all
Dim Propval(1) as New com.sun.star.beans.PropertyValue
Propval(0).Name = "FilterName"
Propval(0).Value = "Text - txt - csv (StarCalc)"
Propval(1).Name = "FilterOptions"
Propval(1).Value ="9,34,0,1,1" 'ASCII 9 = tab
FileName = "C:\Documents and Settings\username\Desktop\Archivo.txt" '
FileURL = convertToURL(FileName)
oCSV = StarDesktop.loadComponentFromURL(FileURL, "_blank", 0, Propval())
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.