Home » Developer & Programmer » Forms » args list not working
args list not working [message #81738] Mon, 17 March 2003 08:45 Go to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
I am processing excel sheet.I wanted to save that excel sheet as .prn file.So i used the following code:

args:=ole2.create_arglist;
ole2.add_arg(args,'C:Ora.prn');
ole2.add_arg(args,'Formatted text(Space delimited)(*.prn)&#124*.prn|');
ole2.invoke(worksheet,'SaveAs',args);
ole2.destroy_arglist(args);

here Ora.prn in my file name.

But am not getting format exactly i wanted.When i open ora.prn it contains some junk characters.So can any one pls tell me where the problem is?

Thanks
~V~
Re: args list not working [message #81742 is a reply to message #81738] Mon, 17 March 2003 14:59 Go to previous messageGo to next message
magnetic
Messages: 324
Registered: January 2003
Senior Member
you tried to make it simple, by saving as a *.txt file??
if this works fine, rename the file to *.prn.
[[a batch can automate the renaming..]]
Re: args list not working [message #81749 is a reply to message #81742] Tue, 18 March 2003 03:54 Go to previous messageGo to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
I have done so.But its not allowing.This is my ora.txt or ora.prn file.Both are containing junk characters.
B  a  =            =  x x X/#8  X@   "       1   A r i a l 1   A r i a l 1   A r i a l 1   A r i a l    "$"#,##0_);("$"#,##0)!   "$"#,##0_);[[Red]]("$"#,##0)"   "$"#,##0.00_);("$"#,##0.00)'  " "$"#,##0.00_);[[Red]]("$"#,##0.00)7 * 2 _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_). ) ) _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)? , : _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)6 + 1 _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)                        +   )   ,   *         `     Sheet1    Sheet2    Sheet3      8     manikan
 
  @    d 
   Oh +'0   @  H  h  x
     Microsoft Corporation   AM5109 f  Microsoft Excel @ (@ 9    ՜. +,0  P  X  d l  t  | 
    3 
   Sheet1  Sheet2  Sheet3    Worksheets     F W o r k b o o k     S u m m a r y I n f o r m a t i o n (      D o c u m e n t S u m m a r y I n f o r m a t i o n 8   

THanks
~V~
Re: args list not working [message #81751 is a reply to message #81742] Tue, 18 March 2003 04:12 Go to previous messageGo to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi,
I have done so.But its not allowing.This is my ora.txt or ora.prn file.Both are containing junk characters.
B  a  =            =  x x X/#8  X@   "       1   A r i a l 1   A r i a l 1   A r i a l 1   A r i a l    "$"#,##0_);("$"#,##0)!   "$"#,##0_);[[Red]]("$"#,##0)"   "$"#,##0.00_);("$"#,##0.00)'  " "$"#,##0.00_);[[Red]]("$"#,##0.00)7 * 2 _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_). ) ) _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)? , : _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)6 + 1 _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)                        +   )   ,   *         `     Sheet1    Sheet2    Sheet3      8     manikan
 
  @    d 
   Oh +'0   @  H  h  x
     Microsoft Corporation   AM5109 f  Microsoft Excel @ (@ 9    ՜. +,0  P  X  d l  t  | 
    3 
   Sheet1  Sheet2  Sheet3    Worksheets     F W o r k b o o k     S u m m a r y I n f o r m a t i o n (      D o c u m e n t S u m m a r y I n f o r m a t i o n 8   

THanks
~V~
Re: args list not working [message #81764 is a reply to message #81738] Tue, 18 March 2003 12:38 Go to previous messageGo to next message
magnetic
Messages: 324
Registered: January 2003
Senior Member
i see the problem now:
you try to export data from excel to a *.prn.
the strange characters are a part of the excel itsself.
you should check otn.oracle.com about exporting data from excel. they must have something about this
Re: args list not working [message #81769 is a reply to message #81764] Tue, 18 March 2003 22:17 Go to previous messageGo to next message
Victoria
Messages: 152
Registered: July 2002
Senior Member
Hi Magnetic...
Thanks a lot....My problem i need to open,process the xisting excel file.Here the file should be selected by the user from windows common diaglog box.I have completed those things...even i have completed reading a cell value from excel.But is there any other simpler way of reading a whole record(one row at a time from excel,process it and then save that excel sheet as .prn file so that it can be sqlloaded into data base using sql loader..I hope you got my problem...
ANy idea???

Thanks
~V~
Re: args list not working [message #81772 is a reply to message #81769] Wed, 19 March 2003 12:34 Go to previous message
magnetic
Messages: 324
Registered: January 2003
Senior Member
if a excelsheet contains more then 1000 rows, dont use ole2. too many client/server communication decreses the performance very much.
imagine, a user choses a excel , clicks a button to convert, and wait for at least 15 minutes to be possible to interact with forms again.
your boss will not be happy with this :)

if this is a urgent problem, you could do the next:
you know you can open a excelfile and change the data to another format like *.txt [[in excelmenu something like change to columns..]]
you can even give preferred delimiter-sign..
save it as *.txt and use sqlloader to load it in oracle.. again.. this works if you dont have that much excelfiles to convert.
but if you insist to automate it then i am curius about the way you do it
its very strange to me that you get those junk chars
try out a demo load by making a dummy ecxelfile and just fill in the A1 cell and read only this one.. see what happens..

you also can search on internet for the perfect solution wich should be exist,i think.
Previous Topic: Forms6i(Parameter) Urgent
Next Topic: Please give u'r Ideas
Goto Forum:
  


Current Time: Sun Jun 30 13:57:15 CDT 2024