Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Excel files in C++ Builder XE


This question is answered.


Permlink Replies: 4 - Last Post: Mar 17, 2016 9:18 AM Last Post By: Stefano Bristot
Stefano Bristot

Posts: 6
Registered: 10/6/01
Excel files in C++ Builder XE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 16, 2016 6:58 AM
Hello everybody,
I use C++ Builder XE Pro and I need to create an Excel file and to populate it with my data (strings and numbers).
(I don't need to open Excel, I just want to create an Excel File)

I have searched a lot and I have found some pieces of code but I wasn't able to put them together in a working application.

I have found another difficulty: in the help of some functions like
System.Variant.OlePropertyGet
is highlighted the fact that some parameters may be different for localized version of the Automation Server.
My operating system language is italian and also Excel is localized for italian language (also "IF" function has been translated in "SE".......) so perhaps I need also to know the italian localizations of these parameters that I was not able to find anywhere.

Anybody can help me with a working sample or some good tips?

Thanks in advance.

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM
Jan Dijkstra

Posts: 206
Registered: 11/4/99
Re: Excel files in C++ Builder XE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 16, 2016 8:57 AM   in response to: Stefano Bristot in response to: Stefano Bristot
Stefano Bristot wrote:
Hello everybody,
I use C++ Builder XE Pro and I need to create an Excel file and to populate it with my data (strings and numbers).
(I don't need to open Excel, I just want to create an Excel File)

I have searched a lot and I have found some pieces of code but I wasn't able to put them together in a working application.

I have found another difficulty: in the help of some functions like
System.Variant.OlePropertyGet
is highlighted the fact that some parameters may be different for localized version of the Automation Server.
My operating system language is italian and also Excel is localized for italian language (also "IF" function has been translated in "SE".......) so perhaps I need also to know the italian localizations of these parameters that I was not able to find anywhere.

Anybody can help me with a working sample or some good tips?

Thanks in advance.

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM

Why don't you just create a comma separated text file ( .CSV) with your data in it? Excel is capable of reading those.
Stefano Bristot

Posts: 6
Registered: 10/6/01
Re: Excel files in C++ Builder XE  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 16, 2016 9:26 AM   in response to: Jan Dijkstra in response to: Jan Dijkstra
Jan Dijkstra wrote:

Why don't you just create a comma separated text file ( .CSV) with your data in it? Excel is capable of reading those.

Thank you Jan for your answer.
CSV file is my "plan B" but I'd like to use Excel file, it will not be impossible, I hope...
david hoke

Posts: 616
Registered: 2/9/07
Re: Excel files in C++ Builder XE [Edit]
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 17, 2016 7:38 AM   in response to: Stefano Bristot in response to: Stefano Bristot
Haven't used it myself, but did try the sample, and seems to
compile/run with bcb2007, and generate simple file loadable with
excel2003 on WinXPSP2:
http://www.codeproject.com/Articles/2888/Saving-Excel-Workbook

Stefano Bristot wrote:

Hello everybody,
I use C++ Builder XE Pro and I need to create an Excel file and to
populate it with my data (strings and numbers). (I don't need to
open Excel, I just want to create an Excel File)

I have searched a lot and I have found some pieces of code but I
wasn't able to put them together in a working application.

I have found another difficulty: in the help of some functions like
System.Variant.OlePropertyGet
is highlighted the fact
that some parameters +may be different for localized version of the
Automation Server+. My operating system language is italian and also
Excel is localized for italian language (also "IF" function has been
translated in "SE".......) so perhaps I need also to know the italian
localizations of these parameters that I was not able to find
anywhere.

Anybody can help me with a working sample or some good tips?

Thanks in advance.

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM
Stefano Bristot

Posts: 6
Registered: 10/6/01
Re: Excel files in C++ Builder XE [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 17, 2016 9:18 AM   in response to: david hoke in response to: david hoke
Thank you very much David!
This sample works also with C++Builder XE and it seems to be what I need!

david hoke wrote:
Haven't used it myself, but did try the sample, and seems to
compile/run with bcb2007, and generate simple file loadable with
excel2003 on WinXPSP2:
http://www.codeproject.com/Articles/2888/Saving-Excel-Workbook

Stefano Bristot wrote:

Hello everybody,
I use C++ Builder XE Pro and I need to create an Excel file and to
populate it with my data (strings and numbers). (I don't need to
open Excel, I just want to create an Excel File)

I have searched a lot and I have found some pieces of code but I
wasn't able to put them together in a working application.

I have found another difficulty: in the help of some functions like
System.Variant.OlePropertyGet
is highlighted the fact
that some parameters +may be different for localized version of the
Automation Server+. My operating system language is italian and also
Excel is localized for italian language (also "IF" function has been
translated in "SE".......) so perhaps I need also to know the italian
localizations of these parameters that I was not able to find
anywhere.

Anybody can help me with a working sample or some good tips?

Thanks in advance.

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM

Edited by: Stefano Bristot on Mar 16, 2016 6:59 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02