Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing Excel import behaviour (Excel 2007)

    I want to open a Excel File from within SAP. When Excel opens it reads the fields and queses the field type. In this file I'm opening it has a credit card number. Excel then changes it to a numeric value and then due to Excel limitations the last digit of the 16 digit number changes to 0 (Limitation = 15 digit precision number). Are there a work around to switch or change this behaviour

    TIA

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Changing Excel import behaviour (Excel 2007)

    I guess you have to specify the field type to be text from within SAP.

    But I also suspect SAP is using CSV or txt fileformat, so you cannot affect field format settings. Change .csv to .txt and use Excel's text import wizard to set up the field types.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Changing Excel import behaviour (Excel 2007)

    Your description confuses me. First, you state that you want to open an Excel file in SAP, but next it appears that you're importing a file into Excel.

  4. #4
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Changing Excel import behaviour (Excel 2007)

    Thanks Jan
    Thanks Hans

    I will try and explain Hans. Inside SAP (Access is the same) you have the option to open your current view with Excel and the SAP Report changes to an excel worksheet. May be I should ask if it possible to change the format an table is shown in Excel via Excel and not inside Access? I do hope I'm more clear

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Changing Excel import behaviour (Excel 2007)

    You probably can't change the way SAP creates an Excel sheet. I'd follow Jan Karel's suggestion to export to .txt (not .csv) format and import that into Excel, or to export to .csv and change the extension to .txt before importing into Excel.

  6. #6
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Changing Excel import behaviour (Excel 2007)

    Thanks Hans. The other alternative is to use Macro's. I know that there is a way of using a specific naming convention for the macro, then SAP performs this macro in Excel before it finalise the file for viewing. Does anyone know about any literature on this subject?

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Changing Excel import behaviour (Excel 2007)

    Sorry, I don't know anything about SAP.

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Changing Excel import behaviour (Excel 2007)

    Would this mean you have a template file SAP would use for creating the report? In that case having the Workbook_Open event fire your macro should suffice.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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