Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Data transfering to Excel...

Posted on 1999-01-07
10
Medium Priority
?
233 Views
Last Modified: 2010-04-04
When I transfer data from Delphi app. to Excel97
with OLE there is OK, but when I try do it
to Excel95, system raise error "Unknown language".
What's wrong? Help me please..
0
Comment
Question by:Edukas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355088
Edukas,

I can think of two problems :

1. Do these two excel versions have the same language? (English, English). If not then you've to change some OLE functions and methods
2. OLE for 97 isn't totally compatible with 95 :

http://www.inprise.com/delphi/papers/microexcel/

(This paper was written against Delphi 3.01 and Microsoft Office 97. Portions of the paper would also work with Office 95, but the sections on interfaces, in particular, require that you use Office 97.)

Regards, Zif.
0
 
LVL 44

Expert Comment

by:bruintje
ID: 1355089
Hi Edukas,

This is a question that keeps coming back, MS did a great job by getting the Office 97 apps using much of the same VBA or VBA script language. But as Ziff stated OLE for 97 is different from OLE used in 95 because MS had us to use different flavors of basic for every Office app in 95.
So if you want to use OLE with 95 you have to use the VBA in the language in which it is installed. And look up the commands in the help file.

Hope this helps
:O)
Bruintje.
0
 
LVL 2

Expert Comment

by:shogi
ID: 1355090
Hi

  The Excel 97 hierarchie it's not the same that Excel 95.  So you need DLL for each.  So on your development station you will need to install both Excel.  After you just have to create your object for each one.

Regards,
Shogi
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Edukas
ID: 1355091
I use simple code:

procedure TfrmITSaras.ExportToXLS;
var XLS: variant;
begin
  XLS:=CreateOLEObject('Excel.Application');
  XLS.Visible:=True;
  XLS.WorkBooks.Add;
  .................. // data transfering code
  XLS.ActiveWorkBook.SaveAs(FileName:='ES');
  XLS.Quit;
  XLS:=UnAssigned;
end;

0
 
LVL 44

Expert Comment

by:bruintje
ID: 1355092
Hi Edukas,

Where does the error occur and what message is given'??
This could clear up some things.
Thanks.

Bruintje.
0
 

Author Comment

by:Edukas
ID: 1355093
I think there are error with national regions
or national language settings in windows system.
On my computer this code works properly,
but when I use app on ohters computers
this message appears (NRS or NLS is equal to me).
I see this error appears usually when
they used Excel95, but some time it happens
on Excel97.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355094
Edukas, as previously asked, do these different offices use other languages? If so, that's the problem! for every language you've to use other methods... Like saveAs will only work in English version.
0
 
LVL 1

Accepted Solution

by:
frla0000 earned 200 total points
ID: 1355095
Hi,

I always prefer things done the easy way. Therefore I suggest you to take a look at TAdvExcel at http://www.econos.de/software/borland/aexcel/index.html (freeware) to do it for you. It has saved me a lot of time and it is compatible with MS Excel v 4 and upwards.

Regards, Fredrik.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355096
frla0000,

I believe that component works with DDE, not OLE. Besides, it is not freeware for commercial applications!

Zif.
0
 

Author Comment

by:Edukas
ID: 1355097
When I install Office97 SR-2 patch this problem disapear
on Excel97. MS is MS- "Where do you want to go today"® :)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question