How do I convert CSV = > Excel in Alaska?

This forum is for eXpress++ general support.
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

How do I convert CSV = > Excel in Alaska?

#1 Post by Eugene Lutsenko »

How do I convert CSV = > Excel in Alaska? It is important that this is a universal solution. I have done this many times for specific cases.

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: How do I convert CSV = > Excel in Alaska?

#2 Post by Auge_Ohr »

Eugene Lutsenko wrote:How do I convert CSV = > Excel in Alaska?
do you want to "make" a CVS or are you asking how to create Excel file ?

Excel use ANSI or UNICODE so CVS must have it before import into Excel.

other Way is to write a Excel Sheet using 3-PP Software like libxlsxwriter
https://github.com/jmcnamara/libxlsxwriter

for harbour i use this Wrapper
https://github.com/FTrautwein/hblibxlsxwriter
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: How do I convert CSV = > Excel in Alaska?

#3 Post by rdonnay »

You could try this:

Code: Select all

#DEFINE xlWorkbookNormal  -4143

oExcel := CreateObject("Excel.Application")

cCsvFile := 'workbook.csv'
cExcelFile := 'workbook.xls'
cPassword := nil

oBook := oExcel:Workbooks:Open(cCsvFile)
oBook:SaveAs(cExcelFile,xlWorkbookNormal,cPassword)

oBook:close()
oBook:destroy()
oExcel:Quit()
oExcel:Destroy()
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: How do I convert CSV = > Excel in Alaska?

#4 Post by Tom »

Roger, c'mon. It's sooooo much funnier to struggle with strange code from anywhere and for different languages than to just open a damned CSV file with Excel and save it afterwards. 8-)
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: How do I convert CSV = > Excel in Alaska?

#5 Post by unixkd »

other Way is to write a Excel Sheet using 3-PP Software like libxlsxwriter
https://github.com/jmcnamara/libxlsxwriter
Hi Jimmy

Do you have a wrapper for the libxlsxwriter that you can share with us ?

Thanks

Joe

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: How do I convert CSV = > Excel in Alaska?

#6 Post by Auge_Ohr »

hi,

i make a Misttake

libxlsxwriter is for harbour while libxl.dll is for Xbase++
https://www.libxl.com/

i have NOT made a Xbase++ Wrapper for libxlsxwriter.
for libxl.dll there is a Wrapper in German Xbase++ Forum ... i have to search it

---

found it here https://www.xbaseforum.de/viewtopic.php ... 10&p=93834
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How do I convert CSV = > Excel in Alaska?

#7 Post by Eugene Lutsenko »

Ich kann mich nicht im Forum registrieren: https://www.xbaseforum.de
Mag meine E-Mail-Adressen nicht


User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: How do I convert CSV = > Excel in Alaska?

#9 Post by Tom »

The German Xbase++-forum is blocked for several TLDs. You need a com/net/de/at/(...)-adress for signing in. Most of the attacks come from russia and china. Since it's a german (speaking) forum, we didn't expect to have guests from russia there.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How do I convert CSV = > Excel in Alaska?

#10 Post by Eugene Lutsenko »

Tom wrote:The German Xbase++-forum is blocked for several TLDs. You need a com/net/de/at/(...)-adress for signing in. Most of the attacks come from russia and china. Since it's a german (speaking) forum, we didn't expect to have guests from russia there.
Hi, Tom!

Thank you for your clarification. I didn't want to attack, but to learn. And maybe to some extent share experience. When I tried to register, I used my corporate email addresses of the two universities where I work:
https://kubsau.ru/education/chairs/comp ... taff/3965/
https://kubsu.ru/ru/public-portfolio/39926
The forum always identifies these addresses as unreliable, spam sources, etc.
Last edited by Eugene Lutsenko on Thu May 14, 2020 7:02 am, edited 1 time in total.

Post Reply