OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

IMPORTING ODS INTO A VISUAL BASIC FORM APP

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
philkor
General User
General User


Joined: 23 Feb 2011
Posts: 6

PostPosted: Wed Feb 23, 2011 8:48 am    Post subject: IMPORTING ODS INTO A VISUAL BASIC FORM APP Reply with quote

I'm developing an app in which I'm trying to import an openoffice spreadsheet into a visual basic 2010 express form app so it will be visible in the app as a stand alone and not needing open office to load. I want the spreadsheet to load in my app the same as it would load in openoffice (with all formulas and functions attached). I then want to populate cells in the spreadsheet from within the app, so full functionality of the spreadsheet is needed. Does anyone know how I could do this starting with importing the ODS file? I wont be offended if further expatiation is needed.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Feb 23, 2011 8:53 am    Post subject: Reply with quote

You populate databases through forms. Databases (and queries of databases) can be linked easily to spreadsheets (or pivot tables, or Writer tables).

VB and Excel play very well together since 2 decades. If you really want to misuse a spreadsheet for this, you are far better off with Excel.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
philkor
General User
General User


Joined: 23 Feb 2011
Posts: 6

PostPosted: Wed Feb 23, 2011 8:58 am    Post subject: Reply with quote

I'm actually looking for a way to do this with open office. Excel requires the Excel object libraries, this requires Excel to be installed on my system and Excel is too much $$$. Is there a way with OpenOffice?
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Feb 23, 2011 9:02 am    Post subject: Reply with quote

philkor wrote:
I'm actually looking for a way to do this with open office. Excel requires the Excel object libraries, this requires Excel to be installed on my system and Excel is too much $$$. Is there a way with OpenOffice?

Well, it requires OOo to be installed on your system and OOo's object libraries are by far more complicated than the ones you are familiar with. So OOo might be the far more expensive solution.

Apart from that, this forum is completely unrelated to API questions (but you did not ask one anyway).
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
philkor
General User
General User


Joined: 23 Feb 2011
Posts: 6

PostPosted: Wed Feb 23, 2011 9:27 am    Post subject: Reply with quote

Actually I've never done this with any API so each of them is a fresh start for me. I would rather use open office because neither I nor the people I am preparing this app for will need to spend money on Excel.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Feb 23, 2011 11:59 am    Post subject: Reply with quote

WIthout any office installed it should be fairly easy to unzip the document and pull raw table data out of content.xml using some xml parser availlable in your programming language.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
philkor
General User
General User


Joined: 23 Feb 2011
Posts: 6

PostPosted: Thu Feb 24, 2011 6:11 am    Post subject: Reply with quote

Not completely understood. Do you mean I can do this with Ooo or Excel? I'm having trouble because all code I use to import xls files is not being recognized because I don't have the Microsoft Excel Object Library in my COM references. I guess a better question would be how do I get that. Can you direct me to a step by step on this?
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu Feb 24, 2011 6:21 am    Post subject: Reply with quote

You can do this with VB alone, without Excel nor OOo since the ODF file formats are an open standard.
Anyhow, when you read the data into your own form, a calculator file format is not required. A plain text file or database is all you need.

If you just need some advanced form, you don't even need VB. Simply use a simple dBase table and a OOo form.
how to make a mask to view&edit the data of a spresheet?
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
philkor
General User
General User


Joined: 23 Feb 2011
Posts: 6

PostPosted: Thu Feb 24, 2011 6:45 am    Post subject: Reply with quote

How can I get an advanced for to run as an .exe? Basically I don't want to hand my client an Excel file that they could have made themselves but really thats all they're asking for. They want a program that will populate a quote sheet from a few database driven drop down lists and then have that quote sheet be printable. I want the drop down lists to be available in a separate dialog box (this is where VB comes int) while the sheet is being populated in another. Kind of like a settings tab. When they have populated it the spreadsheet runs the totals based on the value of the each item and does this with the formulas embedded in the .xls or .ods and can then be printed. If this is possible to do with only Ooo and able to outpt an .exe I would be very happy to hear it. Thanks for your awesome help o far by the way. Wink
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu Feb 24, 2011 6:48 am    Post subject: Reply with quote

How about a good programming book? I'd suggest some professional, platform independent language such as Java, Python or even C++. VB is dead.

If you do not know the differences between VB and VBA, between a language and the API you talk to, then you have several problems you did not even think of.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
philkor
General User
General User


Joined: 23 Feb 2011
Posts: 6

PostPosted: Thu Feb 24, 2011 7:10 am    Post subject: Reply with quote

VB is so not dead. Ever heard of the .net framework? VB is a huge part of it. I see through this discussion that you have succeeded in skating around the question. How do you import a .xls or .ods file into a VB form? Do you not know how? If you do it would be nice to see some code on how a .ods can be imported. If not let me know and I'll go to another forum.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Fri Feb 25, 2011 9:46 am    Post subject: Reply with quote

THIS IS NOT THE MACRO FORUM. There are hundreds of postings that may answer your question one way or the other.
This one: http://www.kalitech.fr/clients/doc/VB_APIOOo_en.html can easily be found using google.

VB is just another slang to produce byte code in the dotnet environment. As a stand-alone runtime it is dead. They can not cancel VBA because for many wanna-be-programmers it is the only thing they can handle. It is a shame that this office suite provides another reservation for this silly programming language but this one has absolutely nothing to do with VB.

You don't want to use OOo. You want a cheap clone of Excel. I don't think that we will see any such product before Microsoft is as dead as VB.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
joelstoner
Newbie
Newbie


Joined: 19 May 2012
Posts: 1

PostPosted: Sat May 19, 2012 8:47 pm    Post subject: Reply with quote

I really don't understand why people choose to reply to questions with either A the answer, or B a question to understand more? If you do not know how to do it then say so, do not say that the chosen language is dead. It is not helpful in the least, and quite annoying when you are trying to figure out how to do something, and keep running into posts that have nothing to do with the question asked.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sun May 20, 2012 3:38 am    Post subject: Reply with quote

joelstoner wrote:
I really don't understand why people choose to reply to questions with either A the answer, or B a question to understand more? If you do not know how to do it then say so, do not say that the chosen language is dead. It is not helpful in the least, and quite annoying when you are trying to figure out how to do something, and keep running into posts that have nothing to do with the question asked.

I really don't understand why alleged programmers register here and put their first post in the wrong forum, shouting no other statement than
"I am a wanna-be-programmer unable to read instructions written for true programmers. I can not even ask a technical question. I don't even know how to find relevant information on the internet."
I gave many thinkable answers and hyperlinks for a completely pointless non-question.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group