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

Options to save text out of a Calc file?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
mg
General User
General User


Joined: 29 Jan 2004
Posts: 6

PostPosted: Thu Jan 29, 2004 5:29 am    Post subject: Options to save text out of a Calc file? Reply with quote

Hi,

I try to extract text out of a Calc file but get only a empty file Sad

Code:

    Set SaveParamsCalc(0) = OOoPropertyValue("Overwrite", True)
    Set SaveParamsCalc(1) = OOoPropertyValue("FilterName", "scalc: Text - txt - csv (StarCalc)")
    Document1.storeToURL FN_Dest, SaveParamsCalc


What could be the problem?
(I use Visual Basic but this should not matter...)

Thanks in advance.
Back to top
View user's profile Send private message
avantman42
Super User
Super User


Joined: 28 Jul 2003
Posts: 751
Location: Staffordshire, UK

PostPosted: Thu Jan 29, 2004 6:01 am    Post subject: Reply with quote

Isuspect the filter name may be wrong. See this thread for more information on filter names:
http://www.oooforum.org/forum/viewtopic.php?t=3549

Russ
Back to top
View user's profile Send private message
mg
General User
General User


Joined: 29 Jan 2004
Posts: 6

PostPosted: Thu Jan 29, 2004 6:30 am    Post subject: Reply with quote

Hm, no I think this should be right. Have copied it from
http://framework.openoffice.org/files/documents/25/897/filter_description.html
and in this description it says "Uses Options" for this filter, but I do not know which options?!
I think I have to set a propertyValue to say if I want to have plain text, or maybe a cvs file...
But what are name and value of this option?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Thu Jan 29, 2004 7:33 am    Post subject: Reply with quote

You do need to have a correct FilterName from the list.

In addition, if the filter you have chosen requires options, then you need to add another PropertyValue called "FilterOptions".

I've used a CSV import filter before.
http://www.oooforum.org/forum/viewtopic.php?t=4103
and it required a string of options that looked like this...
"44,34,SYSTEM,1,1/10/2/10/3/10/4/10/5/10/6/10/7/10/8/10/9/10"

The Developer's Guide describes how to write these options for the CSV filters.
http://api.openoffice.org/docs/DevelopersGuide/Spreadsheet/Spreadsheet.htm#1+2+2+3+Filter+Options
_________________
Want to make OOo Drawings like the colored flower design to the left?
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 Macros and API 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