Save As operation Question

Scenario - I have a web application that generates Excel documents that can be downloaded or opened directly. The web pages are a mixture of both ASP.NET and Classic ASP so the Excel file is actually generated as an HTML table. When a Save or Save As operation
is done when the .xls file is downloaded a specified file name passed from the web page is used in the save operation. When you open the Excel file after saving Excel displays "The file you are trying to open "filename.xls" is in a different
format than specified by the file extension...Do you want to open the file now?" informing me that the file is not a true xls file. When you continue with the opening the file it opens normally with no issues.
Question or Possible issue: Taking one of these files after it has been saved to a location on the computer outside of the download folder, and perform a Save As operation to change the format to a true .xls file the theExisting File Name is not displayed in
the File Name field. The Save as type defaults to Web Page which is understandable due to how the file is generated.
I've tried this with actual Excel spreadsheets and the File Name field on the Save As operation is populated with the current name of the file and keeps it even if you change the Save as type.
Main Question: Is there a setting somewhere in Excel to prevent the loss of the File Name?

Hi,
According to your description, the "The file you are trying to open "filename.xls" alert is from a feature called Extension Hardening, and you can find more information about it here. 
http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx
As you said and tested, Excel will retain the current file name in file name field when we save/save as the file. It's a default behavior. I suppose that the issue may be caused by the Excel that generated by web application.
I recommend we try the 3 workarounds:
1. Modify the ASP.NET program and make the file change to new excel format when generated
Please see the thread:
http://stackoverflow.com/questions/940045/how-to-suppress-the-file-corrupt-warning-at-excel-download
2. Use "Office Migration Planning Manager" to convert the XLS to XLSX format.
The toolkit also contains the Office File Converter (OFC), which enables bulk document conversions from binary to OpenXML formats. 
Overview on Technet
Download Link
3. Use a macro to convert batch of XLS file to XLSX file and retain the file name.
Sample code:
Sub ProcessFiles()
Dim Filename, Pathname, saveFileName As String
Dim wb As Workbook
Pathname = "C:\Users\myfolder1\Desktop\myfolder\Macro\"
Filename = Dir(Pathname & "*.xls")
Do While Filename <> ""
Set wb = Workbooks.Open(Pathname & Filename)
saveFilename = Replace(Filename, ".xlsx", ".xls")
wb.SaveAs Filename:=Pathname & saveFilename, _
FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
wb.Close SaveChanges:=False
Filename = Dir()
Loop
End Sub
Regards,
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.

Similar Messages

  • 'Save As' operation on an excel file (Urgent) ?

    Hi All,
    I have an excel file in my project directory. I want to save or make a copy of that excel file in the directory with a different name i.e. i want to do 'Save As' operation on it whenever user clicks some button. Thanks in advance
    Best Regards.
    Umer.
    Solved!
    Go to Solution.

    If you only want to save a file with a new name, in the button callback you can:
    (Optional) Use FileSelectPopup to let the user choose the file to operate on. Function will return the complete pathname of the file in a string variable
    Use SplitPath to extract the file name and change it accordingly with standard string functions
    Use MakePathname to rebuild the complete file pathname in a new string variable
    Use CopyFile to operate the copy
    All this does not open the file to examine its content.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • QuickTime won't save ("This operation could not be completed")

    I've done several Full Screen Recordings that are very important, but none of them will save using the File > Save option OR the File > Export options.
    Running QuickTime 10.3 on a Mac Book Pro (OS 10.9.5, 2.7GHz Intel Core i7, 16GB 1600 MHz DDR3 RAM). This should work just fine.
    There's no help I've found on the internet or these help forums that are new enough to be relevant. Help!

    Not familiar with this camera, but here are a few questions/ideas
    When you play the tape in the camera, can you see the tape settings displayed on the camera's lcd?  This may be a menu setting or a button push.  What exactly are the settings?
    Was the tape shot on this camera?  Sometimes, there can be compatability problems with material shot on a different camera.  I think some cameras will playback dvcam material via the video outs but not via firewire,  Could this be the problem.  I have some memory that there may be other formats some cameras will playback via video out but not firewire.
    Hope this is of some help.

  • The Shift operator Question

    Dear sir/madam
    I having question for the shift operator.
    What different between >>> and >> ?
    I have refer to sun tutorial, it state >>> is unsign, what does it mean?
    and last is
    if integer is 13
    what anwer for 13>>8
    is it move for 8 right by position? pls told me in detail
    is it answer same with the 13>>>8 ?
    Thanks for ur solutions

    You can play with the following for a while.
    final public class BinaryViewer{
      final static char[] coeffs = new char[]{(char)0x30,(char)0x31};
    public static String toBinary(int n) {
      char[] binary = new char[32];
      for(int j=0;j<binary.length;j++) binary[j]=(char)0x30;
      int charPointer = binary.length -1;
      if(n==0) return "0";
      while (n!=0){
          binary[charPointer--] = coeffs[n&1];
          n >>>= 1;
    return new String(binary);
    public static void print(int n){
        System.out.print(BinaryViewer.toBinary(n));
        System.out.print("   ");
        System.out.println(String.valueOf(n));
    public static void main(String[] args) throws Exception{
       int n=Integer.MIN_VALUE;//Integer.parseInt(args[0]);
       int m=Integer.MAX_VALUE;//Integer.parseInt(args[1]);
       BinaryViewer.print(n);
       BinaryViewer.print(n>>8);
       BinaryViewer.print(n>>>8);
       System.out.println();
       BinaryViewer.print(m);
       BinaryViewer.print(m>>8);
       BinaryViewer.print(m>>>8);
      System.out.println();
        n=1024;
        m=-1024;
       BinaryViewer.print(n);
       BinaryViewer.print(n>>8);
       BinaryViewer.print(n>>>8);
       System.out.println();
       BinaryViewer.print(m);
       BinaryViewer.print(m>>8);
       BinaryViewer.print(m>>>8);
      System.out.println();
       n=2048;
       m=-2048;
       BinaryViewer.print(n);
       BinaryViewer.print(n>>8);
       BinaryViewer.print(n>>>8);
       System.out.println();
       BinaryViewer.print(m);
       BinaryViewer.print(m>>8);
       BinaryViewer.print(m>>>8);
      System.out.println();
    }

  • Range Operator Question

    Hello all,
    I asked a question yesterday under the title of "Range
    Operator for first 2 letters of item" which was answered promptly and was much appreciated. I have since encountered another problem and would like another example if possible.
    How would I search for all folders under C:\ that start with "Commercial_Global_Trading" through the end of all folders that start with "C"? Can I use a Range Operator for this as well?
    Hopefully it makes sense what I'm asking!
    Thanks!

    Yes it is a bit confusing. Maybe an answer from my previous post will help clear up what I'm asking:
    Using range operators, we can get folders that start with A, B, and C by saying:
    get-childitem 'C:\Folder\[a-c]*'
    We can also get folders that start with Aa, Ab, and Ac by saying:
    get-childitem 'C:\Folder\A[a-c]*'
    What I'm wondering is, is there a way to get all folders in a range, beginning with a specific
    word and then continue through the rest of the range? For example:
    The folder C:\Folder contains the following 6 folders:
    Account
    Commercial
    Commodity
    Commodity_Product
    Conduct
    Finance
    How would I use range operators in get-childitem to return the folders that start with Commodity, and then continue on through the rest of the C's? So the output would be the folders Commodity, Commodity_Product, and Conduct. The folder "Commercial" would
    be excluded from the output. Is this possible using Range Operators and Get-ChildItem?

  • Conditional operator question?

    Hello,
    Quick question, are we not allowed to use the conditional operator this way... see code below:
    char volatile ProgString_[] = "\
    {Fan code} \
    12 <Limit11> [C1_ACM2]_[B1] _AND_ \
    bla bla \
    unsigned char UPC_SYSZ_EndOfTable(unsigned long i){ // Find the double '*' in string
    char volatile *u;
    u = &ProgString_[i];
    if(!(strncmp("*", u, 1))){
    i++;
    u = &ProgString_[i];
    if(!(strncmp("*", u, 1))){
    return TRUE;
    else {
    return FALSE;
    else
    return FALSE;
    void UPC_SYSZ_Parse(){
    unsigned char volatile iOCntr = 0;
    unsigned long volatile i;
    for(i=0; i<200; i++){
    (UPC_SYSZ_EndOfTable(i))?(break):(continue); //<<<<< Invalid expression ??
    I would of used the following compact line:
    (UPC_SYSZ_EndOfTable(i))?(break):(continue);    //<<<<< Invalid expression ??
    to periodically test the end of the string by fetching the "EndOfTable() function and evaluating if the double star is detected.
    If detected, I would break out of the for loop, if not then I would continue.
    Is it possible to do it this way?
    thanks for all help!
    r

    Think of it along the lines of each of the operands of the ternary operator must produce a value (which of course break and continue being statements cannot do).
    Based on your brief example here is what I would do
    for(i=0; i<200; i++){
    if (UPC_SYSZ_EndOfTable(i)) break;
    // doesn't make any sense to put more code down here anyway, so no real point to continue}

  • InDesign under Leopard freezes/crashes due to save-/open-operation

    Since I updated my Mac/OS to Leopard, *InDesign (CS2) often freezes* when I have it perform any kind of open- or save-operation, i.e. whenever the app has to use the OS' save-open-dialogue.
    This includes exporting-to-pdf-operations.
    I have no clue whether this might reflect any special circumstances like using other apps simultaneously or having performed any stuff before. It just happens out of the blue, and very often.
    Restarting the Mac does not solve the problem.
    And then, after restarting InDesign several times, it works fine for the rest of the day.
    And bang, the next day it's freezing again.

    Hi Steve,
    thanks for the hint and the link.
    After reading what they say about Leopard Compatibility I presume folks at Adobe are heaving some kind of festivities going on because lots of people will have to upgrade their apps to CS3 level and offer them quite some cash for that matter.
    VERY REGRETTABLE. I can't quite believe such basic operations like saving a document are undermined by a new OS. Dear Apple Inc., that's just not fine. And I do believe Adobe upgrades are unnecessarily expensive. Some fix for CS2 level apps wouldn't be asked to much from Adobe, IMHO.
    Well, thanks anyway.
    Bernd

  • Save and delete question

    How to find out if there are other related records in another table.
    If there are other related record then delete is not allowed.
    For eample, Order has many items in it. 2 tables -Order Table and OrderItem table - one to many relationship.
    Then Can't delete a record in the order table if there are related record in the OrderItem table.
    I have 3 text fields. Enter data in it and then press the save button.
    It will save it to the database.
    how to force people to enter the data.
    That is, if they press save and if any of the 3 text fields is empty then
    show a message box saying need to fill in all text fields.
    How to find out if the text field is empty?
    How to save to multiple tables.
    That is, how to save the master table first then the detail tabes.
    For example, there is a order table and a orderItem table.
    When save button is clicked. must save to Order table first then to
    orderItem table.
    How to find out if the user is saving the data and that data already
    exists in database. So this is wrong. Can't have duplicate data.
    ----------------------------------------------

    For ur first question:
    use the transction to delete.if u found any of the conditions u mention rollback.seee the Connection class in jdbc API.normally its AtuoCommint true.so before starting transction setAutoCommit fasle.
    second question:
    in the saveButton action performed first check the textField.getText().equals("") for all the 3 textfields.if the condtions doesnt met popup optionpane.showdialog();
    if met just save it.
    3 rd question answer:
    this also same like first question.try to save in transaction.if anything happens wrong everything will be rollbacked.
    4th question:
    use unique in sql .u can set the 1 r more columns in table as unique key.
    for all these to work ur database shud support transactions....

  • CWMS 1.5 Operational Questions

    Hello All:
    I am looking for some help with my new CWMS 1.5 system.  I have several problems listed below.  If the features aren't in the current release, I am interested if they might be planned for an upcoming release.
    1.  How do you delete a user or a mis-typed email address?
    2.  How do you delete the branding logo?  We uploaded a logo but can't find a way to set it back to default.
    3.  How do you restrict some people to WebEx with desktop sharing and others to just personal audio conference calls?  Looking for some sort of class of service capability.  Might want to also allow Mobile and other features by class as well. 
    4.  How do you generate a report of the Userids, pins, and host/moderator numbers assigned? 
    5.  How do you turn off email notifications?  We want to load a large list of users but when we do it sends everyone an email.  We are trying to stage the system and get ready for testing.
    6.  Is there a way to allow someone from our Service Desk to act as an operator on a call that would be able to mute a line?  Looking for some sort of BigBrother capability.  Should have full access to someones account and all active conference calls.
    7.  Is there a way to get a report of what numbers were dialed?  Looking to determine number of internal versus external callers.
    8.  Why is public access required for IOS functionality?  The IPAD or IPHONE can be on the company local network or connected with a VPN connection.  We don't have IRP installed but IOS should still work.

    Hello David,
    Let me answer some of your questions:
    1. You cannot delete a user profile. If you mis-typed an e-mail address, all you can do is DEACTIVATE the profile. The behavior is the same as in WebEx SaaS.
    2. At this time there is no supported way to delete the company logo using GUI. I am sure there is a way to remove it via CLI, but you would need TAC assistance for this.
    3. At this time, it is not possible to differentiate privilege levels on per user bases. Any changes to capabilities is done on per system basis.
    4. All the available reports are found in the Reports section. There is no such a report that you are looking for. Only available reports that come within Customize Your Report are:
    UserLicenseUtilizationReportForThisMonth.csv
    UserLicenseUtilizationReportForLastMonth.csv
    SystemDowntimeReport.csv
    NetworkBandwidthUtilizationReport.csv
    MeetingReport.csv
    FraudAttemptsReport.csv
    5. At this time, if you are importing users via CSV file, only if you mark the user as INACTIVE during the import (in a csv file under column ACTIVE you mark N for the user profile) the system won't send an e-mail. Once you mark the user as ACTIVE, the system will e-mail the end user.
    6. At this time, only host of the meeting can perform those actions within the WebEx Meeting Room.
    7. There is no such a report in CWMS.
    8. I cannot provide you an answer for this question as this is rooted in product design. Mobile devices require IRP server to be able to join meetings on CWMS.
    I hope any of these answers will help.
    -Dejan

  • WLS 11g License File Operational Question

    Hello,
    I understand there is no license file anymore with WLS11g download, however of course you need a license for usage of WLS11 in production.
    So I understand it is more a legal issue that you have to buy a license.
    My question is, what do you get if you buy a license for WLS?
    - A file that is technically not used?
    - A letter stating you have bought a license that can be used for a particular CPU?
    I wonder if you still get a file (which does not affect the functionality of WLS) do I have to take care to place in the right location for legal lissues?
    I am thinking of operational guidelines in bigger/big environments.
    - Is there a technical way to check/gurantee in large environmnet by talking to the WLS instances and retrieve the current licensing?
    I guess no one wants to risk running unlicensed instances.
    thanks for your input to this untypical question,
    B.

    If you contact support, there has been discussions going on of making available some type of auditing software to cover the cases that you mention for organizations that want to monitor their compliance and deployments on their own. I'm not sure the status of that effort.
    The license file is no longer even present in 11g at all.

  • Installed 3D Desktop Aquarium screen saver several operating systems ago. It was not designed to operate with the intel setup so I uninstalled it. Problem is that the sound track remains and I don't know how to get rid of it.

    Have an iMac with Lion OS. Installed 3D Desktop Aquarium screensaver a couple of operating systems ago. When I "upgraded" to Snow Leopard the screen saver would no longer work so I (thought) uninstalled it. The fish are gone , but the sound is still there drowning out everything else. How can I get rid of this?

    How did you remove it?
    Does it have a Pref Pane in System Preferences?

  • Batch Process Export As and Save As JPEG Question?

    What is the method for creating scaled JPEGs from PNG files with batch processing (File | Batch Process...)?
    Application environment: Fireworks CS4.
    Using History panel, I manually captured instructions
    Modify | Transform | Numeric Transform (13%)
    Modify | Canvas | Fit Canvas
    File | Save As (JPEG)
    History panel's saved JavaScript file script:
    fw.getDocumentDOM().scaleSelection(0.11999999731779099, 0.11999999731779099, "autoTrimImages transformAttributes");
    fw.getDocumentDOM().setDocumentCanvasSizeToDocumentExtents(true);
    fw.saveDocumentAs(null, true);
    Running this sequence as a batch job requires manually selecting JPEG and "okaying"
    CS4 documentation for saveDocumentAs is defined with different argument list: fw.saveDocumentAs(document) .  CS4 documentation also has: fw.exportDocumentAs(document, fileURL, exportOptions) to export JPEG (80% quality).  CS4 feature File | Image Preview... | Export does not create a history record for guidance.  I cannot find an example of either instruction save a file to a local folder in JPEG format.  My objective is to add an additional batch step Rename (prefix) for the JPEG output, and script this a a batch process.

    Joyce,
    Thank you.  Your suggestion helped clear my mental log jam.
    Fireworks batch scripting seems to work in reverse.
    Using "Batch Process..." scripting interface 'Export' (as JPEG) option first, 'Rename' (add Prefix) option second, and then follow these by using the history panel's 2 previously saved steps (Numeric Transform, Fit Canvas), batch process now works.  PNG file (list) is saved in targeted folder as a reduced scale JPEG with a prefixed file name.
    Batch Process allows the entire newly defined command sequence to be saved (script.js).  Placing this (renamed) file into Firework's batch look-up directory for scripts (C:\Documents and Settings\account_name\Application Data\Adobe\Fireworks CS4\Commands) does not work.  The file name does not display in "Batch Process" window "Batch options:" Commands drop-down list.
    Batch Process only works by recreating the above steps each use.
    The new (JavaScript) file is 26 KB.  Is script file size limited in Fireworks "Batch options:" feature?

  • LIKE OPERATOR QUESTION

    Hi All,
    Quite simply I don't really understand two things.
    1) How is the LIKE operator is working to return both columns.
    2) When to use the LIKE operator and when to use the relation operator.
    Thanks.
    (CODE)
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa LIKE bb
    --returns both columns
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa = bb
    --returns nothing
    (/CODE)

    Hi,
    DaveyB wrote:
    Hi All,
    Quite simply I don't really understand two things.
    1) How is the LIKE operator is working to return both columns.The WHERE clause (whether it contains LIKE or anything else) will only control the number of rows: every row will have the same numberr of columns.
    2) When to use the LIKE operator and when to use the relation operator.Use LIKE when you want to use "wildcards" (% or _).
    Use other operators (like =) when you don't have wildcards.
    (CODE)
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa LIKE bb
    --returns both columns
    SELECT *
    FROM ( SELECT TO_DATE ('01/01/2009 12:01:01', 'DD/MM/YYYY HH24:MI:SS') aa,
    TO_DATE ('1-Jan-2009') bb FROM DUAL
    WHERE aa = bb
    --returns nothing
    (/CODE)It's great that you're trying to format your code! I wish everyione did that.
    Use square brackets (&#091; and &#093;) if you want to use &#091;CODE&#093; and &#091;/CODE&#093; tags.
    LIKE operates on strings. Don't use a DATE where a string is required. Do some experiments like the ones you tried just using strings, if you want to see how LIKE behaves.

  • Quick if operator question

    If a and b contain a number each, what should
    if(a>0&&b6=0)be?

    = --> assignment operator
    example:
    a = 0;
    a = a + 1
    // a now equals 1; it doesn't solve the algebraic equation or anything
    == --> comparison operator, returns boolean value
    example:
    if(a == 0)
    // do something
    Now you can correct it.
    theAmerican

  • Math Addition Operator Question

    Hi there,
    I'm trying to write a very simple math equation:
    var gal_width = 100;
    var m_box_pos = 2000;
    var total = (gal_width+m_box_pos);
    When I display this in a text element, the numbers are shown together rather than being added together
    (eg: 1002000)
    I get the feeling Edge is interpreting the + as a string operator rather than a math operator.
    Replacing the + with a - (as a test), the 2 numbers are being subtracted.
    Multiplying the numbers with the * operator also works as it should.
    I've tried many configerations, escaping the operator with no luck.
    Any ideas of how to get addition to work?
    Thanks

    Hi 29sketc.
    console.log( sym.$("text_111").text());
    // logs : 111
    console.log(typeof sym.$("text_111").text());
    // logs : string
    var number_222 = 222;
    console.log(typeof number_222);
    // logs : number
    console.log( sym.$("text_111").text() +number_222);
    // logs : 111222
    text() has produced a String so + is interpreted here as string concatenation.
    var number_111 = 111;
    console.log(typeof number_111);
    // logs : number
    console.log(number_111 +number_222);
    // logs : 333
    When you have two Number variables + is interpreted  as addition.
    Gil

Maybe you are looking for

  • Iphone 3GS gets -1 error on iOS 6.0.1 update??

    Hello everyone! I have a iphone 3GS (fully legit, no jailbreaks, no funny business) and decided to upgrade to iOS 6.0.1 (or the lastest version of 6). Everything went fine and dandy until the update reached the "restoring firmware on the iPhone" stag

  • How to disable Runtime.exec method ?

    i want to disable some method in java like Runtime.getRuntime().exec() and Runtime.getRuntime().totalMemory() can i implement it by change java.policy file ,and how to do it?

  • B320 Card reader doesn't

    Just discovered the card reader on my new machine does not read, does not react or anything when I put a card in.  I downloaded/installed the drivers for windows8 from Lenovo and no change, tried the device manager update and it says I have the best

  • Sample MM Functional Specifications

    Hi friends, Can anybody provide sample MM Functional Specifications. I am not able to get samples, only formats are available. Please help me frnds. Thank You Prabhu

  • Intermediate time in calculation field in BAM11g

    I have two field in my data object receivedtime and endtime.Is there any way to get intermediate time in calculation field?