Save Excel file

Hope sombody can help me!
I want to save an excel file everytime I make a new measurement with an CString from a textfield. At the moment I want to do it as follows:
book.saveas(COlevariant("c:\\file\\file\\*.*"..)
At *.* I want to add the new adress. How ist it Possible?
regards
Stefan

If you want to save the whole project as a new name each time this should work.
CString String1;
CString String2;
int file_count=0;
String1.Format("C:\\file\\file\\basefilename");
while(keep_taking_measuremnts == true)
if(measurement_taken == true)
String2.Format("%s%d.xls",String1,file_count);
file_count++;
book.saveas(COlevariant(String2,....
measurement_taken = false;
//rest of code in measurement loop
This would give you basefilename0.xls, basefilename1.xls,basefilename2.xls etc.
Grant
Grant M. Johnson
Project Engineer
LECO Corporation

Similar Messages

  • Open and Save Excel Files

    Hi All,
    I need code of How to open and save excel file in local system in Oracle forms.
    With Regards,
    Chandra Shekhar

    Hello Chandra,
    Webutil can be used to achieve this functionality.
    STEPS TO FOLLOW
    ================
    1. Install and configure Webutil following instructions in the webutil manual
    and the readme file.
    2. Create a form with a block Eg. DEPT
    3. Create a button, and in that button put the following code -
    DECLARE
    application Client_OLE2.Obj_Type;
    workbooks Client_OLE2.Obj_Type;
    workbook Client_OLE2.Obj_Type;
    worksheets Client_OLE2.Obj_Type;
    worksheet Client_OLE2.Obj_Type;
    args Client_OLE2.List_Type;
    cell ole2.Obj_Type;
    j INTEGER;
    k INTEGER;
    BEGIN
    application := Client_OLE2.create_obj('Excel.Application');
    workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');
    workbook := Client_OLE2.Invoke_Obj(workbooks, 'Add');
    worksheets := Client_OLE2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := Client_OLE2.Invoke_Obj(worksheets, 'Add');
    go_block('dept');
    first_record;
    j:=1;
    k:=1;
    while :system.last_record = 'FALSE'
    loop
    for k in 1..3 /* DEPT has 3 columns */
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    End If;
    next_item;
    end loop;
    j:=j+1;
    next_record;
    end loop;
    /* For the last record */
    for k in 1..3
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    End If;
    next_item;
    end loop;
    Client_OLE2.Release_Obj(worksheet);
    Client_OLE2.Release_Obj(worksheets);
    /* Save the Excel file created */
    args := Client_OLE2.Create_Arglist;
    Client_OLE2.Add_Arg(args,'d:\test.xls');
    Client_OLE2.Invoke(workbook, 'SaveAs', args);
    Client_OLE2.Destroy_Arglist(args);
    /* release workbook */
    Client_OLE2.Release_Obj(workbook);
    Client_OLE2.Release_Obj(workbooks);
    /* Release application */
    Client_OLE2.Invoke(application, 'Quit');
    Client_OLE2.Release_Obj(application);
    END;
    4. Save the form and compile it.
    5. Run the form.
    6. Execute the query in the block.
    7. Click on the button.
    8. An excel file will be created in the d:\ directory by the name test.xls.
    Kind regards,
    Alex
    If someone's answer is helpful or correct please mark it accordingly.

  • Can't save excel files

    Getting an error when trying to save files in excel: "Someone lese is working in 'Network path' right now please try again later.
    All PC's are Windows 7 and Office 2013. I can confirm that the file is not open by anyone else.
    This is becoming very frustrating and I can see other threads on this issue with no resolution.

    If you just can't save Excel file located in shared drive normally, it should not a Office product issue, maybe there are some other applications in the server causes these issue. Check permission and try to disable the preview and detailed
    view to test this issue.
    http://forums.cnet.com/7723-6129_102-591602/excel-problem-saving-documents/

  • Can/How do you save excel files to the cloud?

    How, if at all, can you save excel files to icloud?

    I think you need to upgrade your MacOS.  Mine is running MacOS X 10.8.4. 
    I am running Numbers '09 v2.3.
    Need to sign on to iCloud under Mac Preference Settings.
    When I start Numbers, I can view files stored on iCloud, or locally on the Mac harddisk.
    Hope it helps.

  • Why does Apple say that Numbers can open and save Excel files, when in actuality, it can only open .XLSX files and only Export to Excel (not save-as excel)?

    When attempting to open .XLS files in Numbers, the format is not recognized. When the format is .XLSX, the format is recognized. Why is it this way? It's still much more common for folks to have the .XLS file format on their excel files. Why would Numbers not be backwards-compatible?
    Additionally, to state in the benefits of this program that one can save to 'Excel' is a little misleading. You can't save to anything except .numbers. Sure, you can export to Excel (with file extension .XLS, I might add), but you can't save or save-as.
    Does anyone else see the irony in being able to export to .XLS but not be able to open an .XLS?
    There is something to be said for clarity.
    You can't expect folks to have Numbers and Excel on their systems, so how else are they supposed to open .XLS files in Numbers?
    And I don't need to see another advertisement for NeoOffice or OpenOffice here, thanks. I'd actually like Numbers to be a little more sensible.
    That is all.

    When the advertisements were written, there was no Lion so we were able to Save As Excel.
    At thiqs time there is no longer Save As command under Lion but the feature is always available.
    When your editing task is ended, you are free to use this scheme:
    File > Duplicate
    File > Save and in the dialog you will have the option save as Excel.
    Numbers isn't and I hope that it will not become an Excel editor.
    Its resources contain a flag defining it this way.
    I posted several times a script editing this resource.
    This morning I'm not in a mood allowing me to do your duty.
    Search by yourself in existing threads with a keystring like
    viewer AND editor
    Yvan KOENIG (VALLAURIS, France) jeudi 27 octobre 2011 09:40:23
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • IUploader Issue, not letting me save excel file from within email, as it shows in directions, why not?

    I have been researching for hours how to be able to browse to and select an excel file to upload, when on a website that has an upload button.
    From my research, it stated in iUploader, a user should be able to download an excel file and store it in iUploader's app, and then visit website in iUploader's browser and then select the file from there in order to upload it.
    Well, I can't even get the stupid app to save it as it shows in screen prints directions within the apps home page.
    Anyone else having this issue and did you figure out how to do this?

    No, that doesn't work for me.  And things seem to be inconsistent.  Where it lets you vary the file size (small/medium/large/actual) when large and actual are the same, it doesn't send the actual jpeg file for windows to open.  When large and actual size files are different when you toggle between the two, the file seems to go through to my windows pc ok.  When I tried this through preview, that's when I noticed this difference, not through just email or Aperture yet.  Help!

  • How to save excel file as *.csv

    Hi.
    I must upload excel file and next save as *.csv.
    How can i do it?

    Hi,
    USe the code given in the link
    http://www.sapdevelopment.co.uk/file/file_upexcel.htm
    Cheers
    VJ

  • How do I save excel file with password for read only access ?

    Hi
    I am trying to save an excel file with a password to make it read only when opened
    using OLE2 . I am having a problem with the parameter list. This is my code that does
    work.
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'C:\Reports\Excel\File.xls');
    ole2.add_arg(args, 0);
    ole2.add_arg(args, 0);
    ole2.add_arg(args, 'TEST');
    ole2.add_arg(args, 0);
    ole2.add_arg(args, 0);
    ole2.add_arg(args, 1);
    I also have the following code at the beginning of the program to suppress dialogs.
         OLE2.SET_PROPERTY(application,'DisplayAlerts', 'FALSE');
         ole2.set_property(application,'Visible', 'false');

    Hope it help.
         -- Begin : Protect your worksheet
         args := OLE2.CREATE_ARGLIST;
         OLE2.ADD_ARG(args,yourpassword); -- choose your password
         OLE2.INVOKE(worksheet, 'Protect', args);
         OLE2.DESTROY_ARGLIST(args);
         -- End : Protect your worksheet
         -- Begin : Save and close worksheet
         OLE2.INVOKE(workbook, 'Save');
         OLE2.INVOKE(workbook, 'Close');
         -- END : Save and close worksheet

  • How do I save excel file with new name?

    Returning to using a Mac after 20 years - so not familiar with many things.
    I have an existing Excel file that I am using and making changes to... how do I save it as a new file name?
    I click on the 'disk' icon on the top ribbon but that just saves it as the same file-name with an updated time-stamp... that won't work for me.
    Much appreciate any help!

    Top of screen: FILE -- Save as... Name it - top rectangle and pick a place to save it. DONE.

  • Automatically save excel file

    hi ,
    if i set
    response.setContentType("application/vnd.ms-excel");
         response.setHeader("Content-disposition","attachment;filename=\"excelform.xls\";");
    I get the popup menu saying open or save...
    how can i make the excel file save to a directory i specify without poup open/save(Just make it save to a dir say c:\)

    Replace
    response.setHeader("Content-disposition","attachment;filename=\"excelform.xls\";");
    by
    response.setHeader("Content-disposition","fffff;filename=\"excelform.xls\";");
    and remember to put the correct path where you want to save the file.

  • How to save excel file on iphone

    how do i save an excel file on my iphone

    Hi Suraj,
    Welcome to Apple Support Communities.
    Take a look at Numbers for iOS, it will allow you to view and work with Excel files on your iPhone.
    Apple - Numbers for iOS
    https://www.apple.com/ios/numbers/
    Teaming up with someone who uses Microsoft Excel? Numbers makes it a great working relationship. You can save Numbers spreadsheets as Excel files. Or import and edit Excel spreadsheets right in Numbers. Most popular Excel features are supported, too. Now it’s no problem to work on the same project. Even if you use different apps.
    Learn more about Microsoft Excel compatibility
    -Jason

  • Where XXL_FULL_API saves excel file?

    I need to export internal table in Excel file in background and send it by e-mail. FM succesfuly exports internal table, but i don't know where the FM stores a file.
    Where the FM stores a file???

    Hi,
    Please, have a look at this :
    and maybe try to use the search option of the forum
    Rgd
    Frédéric

  • Unable to save Excel file with RMS feature enabled.

    We have a client who is unable to save a protected workbook. If he disables RMS he is able to save. I have tested this and it is not system wide. I have included a few errors he was getting. This user has Office 2010 running on Windows 7. He has verified
    he is connected to the Domain.<v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe"
    stroked="f"><v:stroke joinstyle="miter"><v:formulas>h  <v:f eqn="if lineDrawn pixelLineWidth 0">
      <v:f eqn="sum @0 1 0">
      <v:f eqn="sum 0 0 @1">
      <v:f eqn="prod @2 1 2">
      <v:f eqn="prod @3 21600 pixelWidth">
      <v:f eqn="prod @3 21600 pixelHeight">
      <v:f eqn="sum @0 0 1">
      <v:f eqn="prod @6 1 2">
      <v:f eqn="prod @7 21600 pixelWidth">
      <v:f eqn="sum @8 21600 0">
      <v:f eqn="prod @7 21600 pixelHeight">
      <v:f eqn="sum @10 21600 0">
     </v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
     <v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
     <o:lock aspectratio="t" v:ext="edit">
    </o:lock></v:path></v:stroke></v:shapetype><v:shape alt="" id="Picture_x0020_1" o:spid="_x0000_i1025" style="width:881.25pt;height:135.75pt;" type="#_x0000_t75">
    <v:imagedata o:href="cid:[email protected]" src="file:///C:\Users\btate\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png">
    </v:imagedata></v:shape>

    I had this issue a while ago.
    We solved the problem by running windows update and installing all office updates.
    Hope it will help

  • How to create a excel file which will open in every version of MS Office?

    For excel file handling we are using Measurement Studio 8.0 for VS .NET 2003. Now we are save the excel file into.xls file using this format "CNiExcelWorkbook::FileFormatExcel9795" . it will save the file. Now the problem is If that PC has MS Office 2003 or lesser version, then its working fine. But if the PC has MS Office 2007, it will giving problem. So my question is how to save  excel file which will support any version of MS Office?
    Tapasen 
    reply me @:  [email protected] or [email protected]

    In your code, write this:
    DATA my_path type string.
    GET PARAMETER ID 'ZPATH' FIELD my_path. "or any other name you choose
    double click on ZPATH, choose create. You will have created a new parameter. You can use any names starting with Z or Y.
    Go to SU01, and set this parameter there (ZPATH)..I hope this doesn't need further clarification.
    In parameter value, put the path to the file..
    After executing the GET statement, the value will be available in the variable my_path. Pass this to GUI_UPLOAD/DOWNLOAD functions, and it should work fine.
    Regards,
    SD

  • Can't open excel file after saving and closing excel with activex

    I'm using activex to write and save excel files in LabVIEW. My application opens excel (not visible)writes a file, saves it, and then closes both the file and excel. When I try to open the file Excel opens but the file is not displayed, I see the excel header and footer but the file itself does not display. My application is still running at this point. Any suggestions?

    It is critical when using ActiveX with Excel that ALL refnums be properly closed when they are no longer used. Just a single refnum left open will cause the exact situation that you describe. Typically, but not required, the refnums will be closed in the reverse order in which they were created. Here is a good sequence:
    Open Application ref
    Property Workbooks ref
    Open Workbook ref
    Close Workbooks ref
    Select Sheet ref
    Select Range ref
    Write Value2 to Range
    Close Range ref
    Close Sheet ref
    Save Workbook
    Close Workbook ref
    Close Application ref
    When you have properly closed all refnums, the problem will disappear.
    Michael Munroe
    Certified LabVIEW Developer
    www.abcdef.biz
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

Maybe you are looking for

  • Mini to nano???

    i have an original mini and have already payed to replace it through apple and i was wondering since the mini is no longer on the production line, if i could get a 4 gig nano instead. i don't care if it's used and refurbished but it would be a lot ea

  • Billing Documents

    Hi Gurus, Can we restrict the no. of billing documents that can be generated on a daily basis? ex: 100 invoices per day. Can it restricted Sales Order wise or product wise or customer wise. Please reply immediately. Thanks and regards Anil

  • Hibernation in Solaris 10

    Is there any hibernation facility which allows the machine to shutdown by saving the contents on the RAM on hard disk and allows user to resume the work from the point he left at (equivalent to Windows) in Solaris 10?

  • Oo4o Runtime-Error 429

    We are successfully using oo4o (8.0.6) to get data from ORACLE Release 7.3 into Word (Office 97 and Office XP). The clients are using NT 4.0 or Windows XP. We tried to install the application on a Windows 2003 terminal server with citrix. We use the

  • About recovering my laptop

    dear sir/madam        i need help regarding my hp recovery.i made a recovery dvd but unfortunately 2nd disc is not working so i just installed a n os manually but it is not genuin as u know so is there any possibility that i get a genunity key from h