(webutil) How to save the file in a specific way?

Hello

I have this part of the code
Arglist := OLE2.Create_Arglist;
  OLE2.Add_Arg(Arglist,'c:\Export.xls');
  OLE2.Invoke(workbook, 'SaveAs', Arglist);
  OLE2.Destroy_Arglist(Arglist);
  -- release workbook
  OLE2.Release_Obj(workbook);
  OLE2.Release_Obj(workbooks);
  OLE2.Release_Obj(application);
who saves the excel C:\Export.xls file. I tried to open a file save dialog box, with
BEGIN
           
  file_name_cl := CLIENT_GET_FILE_NAME('C:\Export', 'ExportExcel.xls', 'XLS Files (.xls)|*.xls|', NULL, SAVE_FILE, TRUE);
  file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl));
  --
  IF file_name_cl IS NULL THEN
     MESSAGE('INSIDE EXCEPTION STATEMENT');
     RAISE user_cancel;
  END IF;
{code]

But the file isn't saved. Why?

So here is all the code
PROCEDURE export_din_datablock (p_block varchar2) is

REQUEST OLE2. OBJ_TYPE;
WORKBOOKS OLE2. OBJ_TYPE;
WORKBOOK OLE2. OBJ_TYPE;
SPREADSHEETS OLE2. OBJ_TYPE;
WORKSHEET OLE2. OBJ_TYPE;
Arglist OLE2. LIST_TYPE;
CELL OLE2. OBJ_TYPE;
J INTEGER;
INTEGER K;
file_name_cl VARCHAR2 (32767).
USER_CANCEL EXCEPTION;
Workfont OLE2. OBJ_TYPE;
WorkInterior OLE2. OBJ_TYPE;
m_item varchar2 (40);
m_tot_columns number: = 0;
LC$ target Varchar2 (256): = "text.xls";
LC$ Fic Varchar2 (256);

-Inner Proc.
Procedure put_cell (number of no_lig,
Number of Col_num,
put_value varchar2,
FONT_NAME varchar2 default null,
font_size directory by default null,
font_style varchar2 default null, - we can use pune "BOLD" pentru "BOLD", "ITALIC" pentru italics, etc.
font_color directory by default null) is
Begin
Arglist: = OLE2.create_arglist;
OLE2.add_arg (arglist, row_num);
OLE2.add_arg (arglist, col_num);
cell: = OLE2.get_obj_property (Worksheet, 'Cells', Arglist);
OLE2.destroy_arglist (arglist);
OLE2.set_property (Cell, 'Value', put_value);

Workfont: = OLE2.get_obj_property (cell, 'Make');
WorkInterior: = OLE2.get_obj_property (cell, 'Interior');
If font_name is not null then
OLE2.set_property (Workfont, 'Name', FONT_NAME);
End if;
If font_size is not null then
OLE2.set_property (Workfont, 'Size', font_size);
End if;
If font_style is not null then
OLE2.set_property (Workfont, font_style, 1);
End if;
If font_color is not null then
OLE2.set_property (Workfont, font_color 'ColorIndex');
End if;
OLE2.release_obj (workfont);
OLE2.release_obj (workinterior);
OLE2.release_obj (cell);
End;


BEGIN

file_name_cl: = CLIENT_GET_FILE_NAME ('C:\Export', 'ExportExcel.xls', ' file XLS (.xls) | * .xls |', NULL, SAVE_FILE, TRUE);
file_name_cl: = SUBSTR (file_name_cl, 1, LENGTH (file_name_cl));
--
IF file_name_cl IS NULL THEN
MESSAGE ("INSIDE THE EXCEPTION STATEMENT");
RAISE user_cancel;
END IF;

APPLICATION: = OLE2. CREATE_OBJ ('Excel.Application');
OLE2. SET_PROPERTY (application, 'Visible', true);

WORKBOOKS: = OLE2. GET_OBJ_PROPERTY (APPLICATION, 'NOTEBOOKS');
WORKBOOK: = OLE2. INVOKE_OBJ (WORKBOOKS, "ADD");
WORKSHEETS: = OLE2. GET_OBJ_PROPERTY (WORKBOOK, 'WORKSHEETS');
WORKSHEET: = OLE2. INVOKE_OBJ (SPREADSHEETS, "ADD");
OLE2.set_property (spreadsheet, 'Name', 'leaf-ul meu');

GO_BLOCK (p_block);
PREMIER_ENREGISTREMENT;
-prima linie dedicated numelui sunt; pe linia incep 2.
J: = 2;
K: = 1;
LOOP
m_item: = get_block_property (p_block, first_item);
K: = 1;
Loop
exit in M_ITEM IS NULL;
If not id_null (find_item (p_block |'.)) ' || m_item)) then
-daca point-urile sunt type specificat (+ eventual alte conditii), atunci to export data din ele
If get_item_property (p_block |'.) ' || m_item, item_type) IN ('ELEMENT of TEXT', 'VIEW ARTICLES', 'LIST', 'CHECKBOX')
and get_item_property (p_block |'.) ' || m_item, visible) = "TRUE" then
If j = 2 then
-preiau dinamic name if sunt afisez pe linia 1, cu "BOLD"
put_cell (1, k, get_item_property (p_block |'.)) ' || m_item, column_name), null, null, 'FAT');
end if;
If not name_in (p_block |'.) ' || m_item) is NULL then
-data afisez
put_cell (j, k, name_in (p_block |'.)) ' || m_item));
End If;
K: = k + 1;
end if;
end if;
-merg urmatoarea inregistrare
m_item: = get_item_property (p_block |'.) ' || m_item, NEXTITEM);
END LOOP;
J: = J + 1;
When the output: system.last_record = "TRUE";
NEXT_RECORD;
END LOOP;
OLE2. Release_Obj (Worksheet);
OLE2. Release_Obj (Worksheets);
-Save the created Excel file
Arglist: = OLE2. Create_Arglist;
OLE2. Add_Arg (arglist, 'c:\export.xls');
OLE2. Invoke (Binder, 'SaveAs', Arglist);
OLE2. Destroy_Arglist (arglist);
-Release of workbook
OLE2. Release_Obj (Workbook);
OLE2. Release_Obj (Workbooks);
OLE2. Release_Obj (application);
MESSAGE ("Export cu success!'");
END;
Please help.
Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

Roger

Not to be confused... YOU read my previous POST.

Also answer me...
How do you want to save the file?
1. replace or add to the file in the folder?
2. create a new file in the folder?

If you answer is first, change your code in a more dynamic way

-Save the opened Excel file
rglist: = OLE2. Create_Arglist;
OLE2. Add_Arg (arglist, file_name_cl);
OLE2. Invoke (Binder, 'SaveAs', Arglist);
OLE2. Destroy_Arglist (arglist);

So then you can give it

-Save the created Excel file
rglist: = OLE2. Create_Arglist;
OLE2. Add_Arg(arglist,'c:\export\newexcelexport.xls');
OLE2. Invoke (Binder, 'SaveAs', Arglist);
OLE2. Destroy_Arglist (arglist);
Your file will be saved in the "C:\export\" a folder with the name newexcelexport

Tags: Oracle Development

Similar Questions

  • Unable to save the file in a specific location

    I created a C:\Users\Projects\Writing projects folder to save my writing projects in. I tried to put a Word file in this folder and I was told that I don't have administrator rights to save a file in this location. I must have administrator rights, because it is my PC, and I have only set up an account with which I set install programs, remove any software, create folders, etc etc, so what happens? He told me that I could save the file under 'my documents '. I don't want to post here, because a load of other detritus accumulates in this folder, and these are files of project specific I want to keep separate (I'm a writer).

    Hmmm, I just did exactly that on my computer with Word 2007 and Home Premium from Windows 7 64 and had no problem at all.  If you have the professional version or complete edition, you can run in a part of the increased security, maybe.  You can still create these folders as subfolders of the My Documents folder and isolate what you put there like that.  Another thing you could try would be to create a LIBRARY that points to the C:\Users\Projects\Writing project that you created.  This might be more likely to succeed.

    One thing I just noticed that is not in your post is your user ID.  You create these records in C:\Users\yourID\Projects\Writing projects.  That's what I was doing.

    Good luck.

  • How to save the file?

    I'm new to Illustrator and have a question.  I created a file with white graphics that will be finally printed on a blue bag.  How to save a PDF or EPS without background for the printer can use the file?  As I said, I'm new to Illustrator and never had no 'official' training in the program.  Thank you!

    Sarah

    Sarah,

    You may also file > Document Setup > transparency > simulation of paper and choose the background color in question, to see the final appearance directly to Illy.

  • DesignJet T2530: How to save the file to the memory of the printer to the flash player?

    We had printed a 19 page file with our DesignJet printer and then deleted the file from our desktop. Customer had need another copy so we printed from the file saved in the memory of the DesignJet. Question: How can I put that it was saved on a USB? Thank you very much!

    Hello

    But remember this file is a temporary file until that backup file more, all are County for sequential printing job. It is not possible to copy for the thumb of the printer.

    Thank you
    Rashed

    I'm not an employee of HP, but I am an engineer @ HP Partner and I share my knowledge of my own time.

    If your problem is resolved please click the button "accept as a Solution.

    If my answer was helpful, please click the 'Thumbs Up' to say 'thank you '.

  • How to save the file in the location you want in the last Skype?

    Hello

    Currently Skype set to automatically update, I am not satisfied the last update, not only me, in our office all only interset not again updated, so not look to see and file is downloaded automatically without asking the permission of receiver or location were hoping, it automcaticall saved inside the "C:\Users\Admin\AppData\Roaming\Skype\My Skype received files." , is not good idea, if someone sends a file without informing the possibility to use it download in the highest place of the reference. How to backup the old version of Skype?

    In Skype, open tools-> Options-> Im settings-> Show advanced options. Uncheck the option: "automatically accept the received files."

    http://community.Skype.com/T5/Windows-desktop-client/got-a-problem-when-download-some-files-from-sky...

  • How to preview the files in a specific folder?

    Hi all!

    Do for myself, a small tool. One of the functions is to show an overview of all files - in a scroll pane. How to display a file, that I already know and how to display all files?

    The Script target InDesign, a few settings and it should work:

    main();
    
    function main() {
        var folder = Folder.selectDialog ("");
              var files = folder.getFiles();
              var imgs = new Array();
              for (var n = 0; n < files.length; n++)
                        if (files[n].name.search(/jpg$/i) != -1)
                                  imgs.push( files[n].fullName );
              var sui_imgs = new Array();
              for (var n = 0; n < imgs.length; n++)
                        sui_imgs.push( ScriptUI.newImage( imgs[n] ) );
    
              var nr_of_rows = Math.floor( imgs.length / 4);
    
              var dlg =
                        "dialog {                                                                                                                         \
                                  orientation: 'row',                                                                      \
                                  alignChildren:['fill', 'fill'],\
                                  pnl: Panel { preferredSize: [400,400], maximumSize: [400,400] },          \
                                  scrl: Scrollbar { preferredSize: [20,400], minvalue: 0, maxvalue: "+ (nr_of_rows) + ", jumpdelta: 3, stepdelta: 1, value: 0  }          \
                                  btns_grp: Group { \
                                            orientation: 'column', alignChildren: ['fill', 'top'],          \
                                            up: Button { text: 'up' },          \
                                            down: Button { text: 'down' }, \
                                            val: StaticText { text: '0' },          \
                                            cancel: Button {text: 'cancel', alignment: ['fill', 'bottom'] }          \
                                            }          \
                                  }";
              var w = new Window(dlg);
    
              // Die IconButtons erzeugen
              var zeile, n = 0;
              var img_btns = new Array();
              for ( var y = 0; y < 4; y++) {
                        zeile = w.pnl.add("group");
                        zeile.orientation = "row";
                        for ( var x = 0; x < 4; x++) {
                                  img_btns.push( zeile.add("iconButton",[undefined, undefined, 85, 85]) );
                                  n++;
                        }
              }
              // Die Buttons für Rauf und Runter
              var shift = 0;
              fill_imgs( shift );
              w.btns_grp.up.onClick = function () {
                        shift = (shift > 0) ? shift-1 : 0;
                        fill_imgs(shift);
                        w.scrl.value = shift;
              }
              w.btns_grp.down.onClick = function () {
                        shift++ ;
                        fill_imgs(shift);
                        w.scrl.value = shift;
              }
              // Die Scrollbar
              w.scrl.onChange = function() {
                        shift = Math.round(this.value);
                        this.value = shift;
                        this.window.btns_grp.val.text = shift;
                        fill_imgs(shift);
              }
    
              w.show();
    
              alert( w.result );
    
              function fill_imgs( shift ) {
                        var btn_index, img_index;
                        for ( var y = 0; y < 4; y++) {
                                            for (var x = 0; x < 4 ; x++) {
                                                      btn_index = y * 4 + x;
                                                      img_index = shift * 4 + btn_index;
                                                      if (img_index < imgs.length) {
                                                                img_btns[ btn_index ].image = sui_imgs[ img_index ];
                                                                img_btns[ btn_index ].asset = imgs[ img_index ];
                                                                img_btns[ btn_index ].visible = true;
                                                                img_btns[ btn_index ].onClick = function () {
                                                                          this.window.result = this.asset;
                                                                          this.window.close();
                                                                }
                                                      } else {
                                                                img_btns[ btn_index ].visible = false;
                                                      }
                                            }
                        }
              }
    }
    

    See you soon,.

    Davide

    www.davidebarranca.com

  • How to save the file on my computer

    It says on my pc I have to backup files important to relate removable data with cd/dvd or usb.not done this before and that it not me .kind cordially.

    It is important to add the operating system, you are referring to (XP, Windows Vista.. .etc

    To back up files in windows Xp, you must first install the backup utility.

    Steps to follow:

    http://support.Microsoft.com/kb/3084

  • How to save the work to a specific size in Adobe Illustrator CC?

    Hey,.

    If I create an art of channel for someone. I used the template provided to YouTube and open in Illustrator. The problem is once I'm done with the art, I deleted the template and there is there a Council of great art and it is in the way, I don't want to influence the size and dimensions of the art of channel. I just need to be 2560px 1440px wide, is it possible that I can save it exactly like that? Please be descriptive, please be quick! Please read and respond to.

    The problem is once I'm done with the art, I deleted the template and there is there a Council of great art and it is in the way, I don't want to influence the size and dimensions of the art of channel. I just need to be 2560px 1440px wide, is it possible that I can save it exactly like that?

    Not sure what you mean by "it is in the way."

    The size of the artboard is not necessarily an impact on the "size of art." (There are some scenarios of workflow where the size of the artboard is recognized and used, but most of the time it's just a 'passive' limit).

    If your art is 2560px 1440px X, and you want the artboard to match, double-click the tool of work plan and choose "Fit the Bounds work" at the top of the presets menu.

  • How to save a file on my mac webscan

    When you use webscan hp7610 how to save the file on my mac?

    Hi roch4t,

    I understand that you have an Officejet 7610 and you're wanting to know how to record a webscan. I will definitely do my best to help you.

    I tested on our Mac 10.9 we have here and came with the screenshot below. Once the scan is finished, I held the CTRL key and clicking on (or if you have a two button mouse, you can just right click) on the analysis and got the drop-down list, you see at the bottom right and selected open in preview. Once it has opened in the preview, I was able to then click on file and save.

    Hope this helps, have a nice day!

  • "Save image under" has changed, without memory of the choice of folder, save the file invisible name, options does not help.

    General options "always ask me where to save files. I seem to get the other option - save the file in (a specific directory) option is selected. Perhaps there is an automatic update of Firefox? The problem started there around the time that Qt Creator, I installed a few days.

    The fixed! Uninstalled windows 7/24 update and restarted. One may wonder what is happening to the Mircosoft to shoot their software in the foot like that?

  • where to save the files under options the file name is duplicated how to remove an additional folder with the same name

    Under Options in Firefox, I clicked on save the files under downloads, but the file name twice and an additional file with the same name is created in the folder, i.e.:

    G:\Akbar's Songs\HAMARA DOWNLOADS\HAMARA FORUMS DOWNLOADS FORUMS

    As you can see the file repeats, how can I fix it?

    Also the music files, I download from a site of downloads as a WinRar file and I need to open it. Y at - it an option where the file opens automatically in the folder I chose?

    Thanks a lot for your help.

    Hi Akush, when you install 7 - zip, make itself the default application to open .zip and .rar files. So if you double click on the .rar file, it should open in 7 - zip. If you prefer to decompress immediately, right click the file and look for new 7 - zip items in the menu. I can't think of a way to do this automatically, however.

  • How to stop Firefox playing mp3 files and allow me to save the file

    I've upgraded to Firefox v28. I want to record an mp3 file to play later as earlier versions of Firefox. When I click on the file, it starts playing and does not give me the option to save the file.
    In the Options, the settings of 'application' for the file MP3 is on "save file". The quicktime plugin is disabled.
    The media.windows - media - foundation.enabled is set to false in: config
    How can I restore Firefox behavior to be like the older versions
    Thank you

    That fixed it! Thank you!

  • I use to manage my DSL modem via an ip address. When I enter FF8 I wonder where to save the file. Why and how can I prevent the FF8 to do this?

    I use to manage my DSL modem via an ip address. When I enter FF8 I wonder where to save the file. Why and how can I prevent the FF8 to do this?

    And now, whenever I'm in an ip address that I wonder if I want to download the file.

    This happens when the modem server does not send the file in text/html, but with a different MIME type.

    I tried adding index.html in the event that the server can send this file as text/html.

    If your DSL modem has a support Web site, then you can try asking it there advice on how to configure the server modem.

  • Re: How to save the video file to a DVD-R for Equium A200

    I have the Equium A200. Someone can tell me how to save the video file to a DVD-R on my computer in order to use it later, or use it in windows movie maker and must not simply copy on another DVD-R right?

    My cursor also has disappered in the suite of windows media, that makes life quite difficult.

    Any ideas?

    Thank you.

    You mean, you want to copy the original DVD movie to HARD drive?
    Well, you can copy the contents of the entire DVD to the HARD drive. It means that you have to copy a lot of data.
    I would recommend shrinking the DVD movies using a tool called DVD shrink.
    It would decrease the data and would also copy the content to the HARD drive.

    But if you want to use these files later in windows movie maker, so you must convert these using a 3rd party tool.
    Google a bit and you should find many free applications that would help you to do this work.

    Good bye

  • How to capture a .gif of a spectrum analyzer file and save the file in PC

    I want to capture a .gif from a spectrum analyzer file and save the file to the PC, but I have a problem when reading data from the instrument. I don't know how to format the string has obtained from the instrument, when I use '%s' or '%t' as string format to read the data from the instrument is truncated.

    my code are, could someone tell me where I'm wrong?

    char resultsArray [5000];

    viPrintf (hSpectrumInstr, ": MMEMTORCR ' CIMAGE.") GIF "\n"); "
    viQueryf (hSpectrumInstr, ": MMEMATA? '") CIMAGE. (' GIF'\n ', '%t', resultsArray);
    printf ("%s", resultsArray);
    GetChar ();

    as you can see your code is not readable, can you post a screenshot or, as before, a Word document?

    When you use "%b" table must be of type ViInt8

Maybe you are looking for

  • detection of task over DIO

    Hello How can I know that triggered external DIO out of finite samples have completed execution? I see there is a 'DAQmx is task performed?', but it means that I have to constantly monitor the task. Is there a way to generate an event or declaring th

  • How to play image sound and moving of AVI file

    Hello I'm using LabVIEW 2010 and making the program to play image sound and moving to AVI file at the same time. I could play animated image of AVI file using "AVI OPEN.vi". However I couldn't play the sound file to AVI. Please give me an opinion on

  • Editing the registry disabled by the administrator.

    Original title: REGISTRY EDITTING PROBLEM So who to install a printer from the laptop comes up with a message... "' RESGISTRY EDITTING DISABLED BY THE ADMINISTRATOR"... Funny, but I thought that I was the owner / administrator of the laptop. How you

  • SanDisk Extreme USB 3.0 64 GB on backup

    SanDiskBackup.exe run from USB 3.0 drive 64 GB extreme new root gives the error message: "Please run Backup from an external device, Sandisk SanDisk". Is there a solution?

  • Some of my emails have disappeared; even those that have been reported. That's happened?

    I have reported several follow-up emails. Them and others have diappeared. Can you tell me what caused this?