+ Reply to Thread
Results 1 to 4 of 4

Excel Problem in 3 parts. Importing .xml

  1. #1
    Registered User
    Join Date
    01-28-2007
    Posts
    12

    Exclamation Excel Problem in 3 parts. Importing .xml

    I have one workbook open during the whole process in which .xml files are imported.
    So,

    How do i get a macro which runs in a that open workbook.

    And when any .xml-file is opened from outside (like double clicking a .xml-file on your desktop) into excel this macro automatically sets LoadOption:=xlXmlLoadImportToList and I don't get popup wich tells me to choose! Please!

    Im not looking for:


    Please Login or Register  to view this content.

    Because macro doesn't open .xml, it should only set the LoadOption. Maybe generally setting LoadOption:=xlXmlLoadImportToList?

  2. #2
    Registered User
    Join Date
    01-28-2007
    Posts
    12

    Exclamation Excel Problem 2. Saving .csv properly

    I have a log.csv in which my macro does changes, deletes rows..

    In the end I wish to save this new version of log.csv and replace the old one.

    When I do so, using this code will result in "messy"-csv-file.
    Actually it isn't messy but values are not in their cells like they should be.
    See what i mean: -Image-

    Please Login or Register  to view this content.

    But if i stop the macro in a spot just before above code and do the saving manually - save as - .csv - yes yes... the file is being saved perfectly!

    Help me out please I'm sure you guys know the trick!

  3. #3
    Registered User
    Join Date
    01-28-2007
    Posts
    12

    Exclamation Excel Problem 3. Finding original path of an imported .xml

    Let's assume that we have a C:\imaginary_folder\file.xml

    You go and double click the file, it's opened to excel.
    It's imported to a brand new workbook, named Book1.

    Then suddenly you wish to save Book1, which at this point has no ActiveWorkbook.Path

    However you wish to save Book1 as webpage. And you wish to save it to the same folder with the file.xml.

    At this point you laugh at me and tell me to save it to C:\imaginary_folder\..

    Sure, I know that. BUT Here comes the problem:

    file.xml-files are opened to excel from random folders and each .xml-file should have its own ActiveWorkbook.Path when saving it with a macro.

    I tried this code, but it keeps saving file.htm to C:\

    Please Login or Register  to view this content.

    Help me out here !

  4. #4
    Registered User
    Join Date
    01-28-2007
    Posts
    12
    Thou it's only my opinion. I think combining these wasn't a very good idea only because those are 3 completely different problems. But it's your call afterall!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1