Cells in Excel file output formatted to exponential format

Hi ABAPers,
I have generated an excel file using the FM, ' SO_NEW_DOCUMENT_ATT_SEND_API1 ' and cells in certain column are diplayed in the exponential format in excel. I had converted all the data to be populated into character type.
As you may see, the Invoice Number ( vbeln CHAR 10 ) and the EAN Code ( ean11 CHAR 18 ) are in exponential format.
But, as I expanded the cells, Invoice Number was displayed correctly but not EAN Code.
Invoice Number - 5090002040
EAN Code - 4011100191006
Is it because EAN Code is only 13 Characters long when it was supposed to be 18?
Please suggest any alternate logic for the EAN Code.
Thanks.
Arun G Nair

Hello Alex,
No spaces or apostrophes or inverted commas are to be added to the EAN Code ( 4011100191006 ).
I have tried fetching the value and storing it into a string and then assigning that string to ean code variable but didn't work out. At the moment it is being stored in a variable of character datatype.
As you may see, it works fine for Invoice Number, then why is it NOT working for EAN Code. They have the same character datatypes and are also asigned to variables of similar datatypes.

Similar Messages

  • Importing Excel Files and Formatting Issues

    Good afternoon ladies and gentlemen. When in doubt, post in the forum! Anyway, I am using java via ODBC to connect to an excel file to extract some info from it, using SQL statements. Everything can be extracted without any problems, however, Excel keeps pi$$ing me off by changing the format of the cell data.
    Firstly, I highlight every cell in my Excel file and format it as "Text."
    Then I extract the cell info by using a ResultSet and getting a String (even for numeric data - ResultSet.getString(...))
    What is getting on my nerves is that not only does it not extract numeric values followed by a string, when it does extract numeric values, it is adding a ".0" after the value.
    For example, if the cell value is 123, it will return 123.0
    If the cell value is 123SHOE, it returns null
    Furthemore, when editing the Excel file, after having every cell formatted as "Text," if I enter a number, say, as a zipcode, 123450000, it brings up an error! But the very definition of "Text" states that "Text format cells are treated as text even when a number is in the cell."
    The moral of the story is, I want to convert all data in the Excel file to "Text" and when extracting data from the file, I need to be able to extract numbers, numbers followed by characters, and everything else.
    Any suggestions?
    Thanks much,
    Josh

    Hey Dr. Clap, quick question for ya. I was checking out the Apache POI you recommended. More specifically HSSF. I noticed in the documentation that "String cells cannot conatin numbers and numeric cells cannot contain strings." Unfortunately, this is not going to work well with my app as some of the primary keys (I use the term loosely) are Strings which contain numbers. My main problem is that my app wont recognize the Strings containing numbers, so it returns null, and Excel is chopping off the leading zeroes and is popping up with an error because numbers are in the String. However, as I stated before, Excel notes that text cells can contain numbers!
    FYI, I am using Pervasive SQL to extract a given list of users in a DB (which I dont want to connect to directly) and am saving that generated query (list of users) into a text file. I then open the text file in Excel which parses it correctly and assigns the cells the correct values. So I don't think I can format the cells as text because I am importing the file I generate. I love doing things ass backwards :) Another reason I am using Excel files is so anyone can use the software so long as they have an Excel file with the appropriate columns within the file.
    Thanks yet again and I'll keep searching.
    Josh

  • When converting a PDF to an excel file, the format converts but none of the wording comes across

    When converting a PDF file to an excel file, the format converts but none of the wording comes across

    When converting a PDF file to an excel file, the format converts but none of the wording comes across

  • How to determine data type of cell in Excel file

    I have a company standard Excel file that needs to be read to determine what tests to run.  I have no control over its format.  I need to be able to tell what the data type is in order to read it using the LabView sample code.  It is a hodge poge of numbers and strings.  Some of the numeric fields are formated as hex while some are floating point.  There does not appear to be a vi that I can call to determine info about the cell formating.  As I remember it, the Windows Active X control for accessing Excel support that.  I really was hoping to avoid dealing with the Active X control for Excel directly.
    Any help/ideas?
    Outputting it in CSV or similar is not an option.
    Solved!
    Go to Solution.

    If you have to deal with Excel directly, I don't see how you're going to get around using Active X.
    MSDN page on using ActiveX

  • Transferring User-Entry Cells from Excel Files

    Hello,
    I apologize in advance if this is a question better answered in a Microsoft Excel forum, but I saw some really good discussions here, and I think my question applies just as much to Acrobat.
    I work at a college and we create a lot of excel files -- one for each student. I'd like to be able to create excel files with fields that would accept user-entered data, then save this excel file as a PDF so that the user-entry fields are preserved. I can't seem to figure out a way to do this, but I'd like to avoid having to go into each PDF with Acrobat after the fact to add the appropriate fields to each form.
    If not that, is there a way to change acrobat settings such that the user will be allowed, using Reader, to enter text anywhere on the form (without altering the text that's already there)?
    Thanks so much for your time and thoughts!
    -Devin

    There is not a built-in way to convert from Excel to PDF so that the cells are automatically converted to form fields in Acrobat with the data retained.
    To allow Reader users to add text to a PDF, it needs to be enabled for commenting (Tools > Typewriter > Enable Typewriter too in Adobe Reader, for example), which allows Reader to add text using the Typewriter tool. Or "Comments > Enable for Commenting and Analysis in Adobe Reader", which allows other types of comments (e.g., Text Box) to be added with Reader.
    If the layout is static, you can import data exported from Excel and fill fields in a PDF form. The data file needs to be a text file in tab-delimited format, with the PDF field names provided in the first row, and subsequent rows being the corresponding field data. You can import in Acrobat using: Forms > Manage Form Data > Import Data. When you select the text file, it will promt you to import a row of data from the text file.

  • Using Lab view ver 6,How can I read a cell of excel file right after I write to it

    How can I read a specif cell of an Excel file using Labview VI.

    Hi,
    Attached is a LV6.1 VI which will read a cell.
    It will be looking for a sub VI found in the example C:\Program Files\National Instruments\LabVIEW\examples\comm\ExcelExamples.ll​b.
    The returned value is a string value but there is no reason why it couldn't be a number. Just connect a numeric to the type connector of the Variant to Data function.
    Hope this helps.
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    Get_Cell_Value.vi ‏41 KB
    Write_Table_To_XL.vi ‏101 KB

  • Issue after downloading excel file: SYLK format

    Hi experts,
    I have downloaded an excel file through 'GUI_DOWNLOAD'.
    When I open the file, I get a pop up message which says:
    "Excel has detected that mg.xls is a SYLK file, but cannot load it. Either the file has error, or it is not a SYLK file format.
    Click OK to try to open the file in a different format."
    mg.xls is the excel file name.
    When I click OK, the the file opens in a proper XLS format.
    But I am not sure why is this pop up message coming.
    Thanks,
    Ajay.

    Hi,
    GUI_DOWNLOAD dows not download in excel format
    Use following FM
    call function 'MS_EXCEL_OLE_STANDARD_DAT'
    exporting
    file_name = p_file " path offile where u need to download
    CREATE_PIVOT = 0
    DATA_SHEET_NAME = ' '
    PIVOT_SHEET_NAME = ' '
    PASSWORD = ' '
    PASSWORD_OPTION = 0
    tables
    PIVOT_FIELD_TAB =
    data_tab = <dyn_table>  "internal table with data
    *fieldnames = int_head "internal table with header
    exceptions
    file_not_exist = 1
    filename_expected = 2
    communication_error = 3
    ole_object_method_error = 4
    ole_object_property_error = 5
    invalid_filename = 6
    invalid_pivot_fields = 7
    download_problem = 8
    others = 9
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regards,
    Prashant

  • Data field shifting to right cell in excel file

    Hi,
    I have proxy to file content conversion scenario in which I have one field in which e-mail getting populated.
    for some email id coimg correct
    in excel file cell
    <EMAIL>[email protected]</EMAIL>
    but for it is getting shifting to right cell
    <EMAIL>[email protected]</EMAIL>
    Please suggest

    Hi ,
    I am doing the Proxy to file contennt conversion in that I have used only fieldSeparator ',' only.
    and it is one to one mapping .
    some data of coloum B is shifting to A for this I have used mapwithDefault with space and this also is not working?
    plz suggest
    Regards

  • Will an Excel file retain formatted cells as a PDF using Acrobat XI Pro?

    Can Acrobat XI Pro create a form that will retain Excel formatted cells for filling in?
    Also, can it create a fillable cell that accepts an actual written signature?

    You will need to set the form in the PDF.
    Facsimile signatures are acceptable for legal purposes. You need to use a digital certificate that 3rd parties can verify but they maybe able to contain a signature image.

  • Changing NACHA File output format

    Is it possible to change the layout for NACHA output file? We sent the output file to our Bank and we have two issues in that file. One is there is extra header that the NACHA is adding which comes after the two headers we have defined in the Pay Method. The bank does not like that. The Second is the routing number at the end of each employee record needs to be shifted 2 characters to the right. How would anyone do these changes? If someone can help me with this ASAP that would be great.
    Thanks

    Thanks for your reply. We found out that an ID was missing in NACHA rules which was the reason for the routing number to be off. But still there is an extra header which Bank is not accepting. As long as it is just a header we are okay to manually delete the header and send to bank.
    Thanks again.

  • DIADEM file output format.

    Hi,
     Could you tell me if there is a way to add a introductory information, such as Title, Date and Location (see below) in exported csv files (separately from the data itself)?
     For example, I would like to create data format of:
    Title,
    Date,
    Location,
    Time, Speed, Temp, Vibration, ... etc
     Data,Data,Data,Data,..... 
    Kind regards
    HiroE

    H HiroE,
    I am attaching an example program that does this.  The standard "CSV" DataPlugin shipping with DIAdem exports tab delimited ASCII files with a *.csv extension.   If you really want the delimiter to be "," or ";" then you need to add the following parametrization:
    FilePath = "C:\Test Commas.csv"Delimiter = "," ' vbTABFileParameters = FileParameters & "<filename>" & FilePath & "</filename>"FileParameters = FileParameters & "<delimiter>" & Delimiter & "</delimiter>"Call DataFileSaveSel(FileParameters, "CSV", SelChStr) 
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    ASCII Export with CSV Headers.zip ‏127 KB

  • How to find out each Cell having Data or Not in Excel File by Using WDJ

    Hi Friends,
    I have one doubt on WDJ.
    I have to Upload Excel File. Click on Upload Button in Excel file Data will move to One Bapi. This is I was done. But my Requirement is if any empty Cell in Excel That File not uploaded it display one error message Please upload Correct Excel File
    How to find out each Cell having Data or Not in Excel File by Using WDJ. Please tell me.
    By Using this Code I have Upload Excel File
    InputStream text = null;
         int temp = 0;
         //wdComponentAPI.getMessageManager().reportSuccess("filePath Vijay:::");
         try
                   File file = new File(wdContext.currentContextElement().getResource().getResourceName().toString());     
    FileOutputStream op = new FileOutputStream(file);
                   if (wdContext.currentContextElement().getResource()!= null)
                          text = wdContext.currentContextElement().getResource().read(false);
                             while((temp=text.read())!= -1)
                                  op.write(temp);
                                  op.flush();
                                  op.close();
                                  path = file.getAbsolutePath();
                                  //wdComponentAPI.getMessageManager().reportSuccess("Path Name :::::"+path);
         catch(Exception ex)               
                   ex.printStackTrace();
    But my Requirement is If excel having any Empty Cell that excel file not uploaded.How to do this...
    Regards
    Vijay Kalluri

    Hi my friend
    I would like to share you some APACHE APi´s that i use when i have to read excel files in Web Dynpro.
    JAR = poi-3.2-FINAL-20081019.jar
    Some Example:
    POIFSFileSystem fs;
    HSSFWorkbook wb;
    HSSFSheet sheet;
    String myMexican_ValueFromExcelis = "";
    try {
             fs = new POIFSFileSystem(new FileInputStream();
             // and select the cell "y"
            cell = row.getCell( 0 );
            myMexican_ValueFromExcelis = cell.getCellValue();  
    }cach(Exception e){
    REgargds

  • Place Excel file and keep accurate formatting

    In my organization, InDesign is used for creating several rather comprehensive price lists (500 pages and more ...).
    Needless to say, each price list contains a lot of tables. Currently we
    create tables in Excel,
    save it as pdf file and
    place the pdf in InDesign
    Of course, that's cumbersome (no Edit Original command --> each modification in the original table restarts the above mentioned process) - that gives us a hard time dealing with hundreds of tables... 
    It would be ideal to place Excel files directly - but after hours of trial & error I'm still not able to insert a table AND keep the accurate Excel-formatting. There are always some smaller or bigger deviations (unexpected line breaks, overset content, wrong line-styles, colors etc.)
    What I did:
    Enabled "Create Links When Placing Text and Spreadsheet Files" in the File Handling Preferences
    Enabled "Import Options" when placing the Excel file
    Choosed "Formatted Table"
    It seems that some older xls files are more likely to raise problems. Newly-created xlsx files are fine most of the time (saving xls to xlsx doesn't make a difference though).
    What are your experiences on importing excel files? Thanks for any hint!
    Regards,
    Florian

    Thanks, Willi.
    The reason why we currently place our tables as PDF is, that we want to avoid any additional setup in InDesign. In fact we use InDesign "merely" to place & arrange all objects like tables, images, text etc. properly. There is no editing or formatting of content done in InDesign (Excel-spreadsheets are well-designed anyway) - I think otherwise our loads of price lists for different countries wouldn't be manageable at the moment ...
    I'm just looking for a way to keep the advantage of placing PDFs (retain accurate form) and eliminate the disadvantages (additional step of saving each spreadsheet as PDF and lack of the "Edit Original" option).
    Any ideas are appreciated!
    Florian

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

  • How can I load an Excel File to a pipe-delimited .csv File

    In SSIS I am attempting to process a .xls File and I have a C# script that is reading the .xls File. My issue is this...I have some fields that have an embedded comma in them. Those fields are designated by a double quote though ". I have included my
    C# Script. I'm just not sure if I have to indicate to it that there is a field delimeter. The " double-quote is only utilized when there is indeed an embedded comma...like "Company Name, Inc"...or "Main St., Apt. 101"
    How can I read this .xls worksheet and account for the double-quotes and the embedded comma and produce a pipe-delimeted file?
    public void Main()
    // TODO: Add your code here
    // Create NEW .CSV Files for each .XLS File in the Directory as .CSV Stubs to store the records that will be re-formatted
    // in this Script.
    try
    string StringExcelPath = (Dts.Variables["User::FilePath"].Value.ToString());
    string StringExcelFileName = (Dts.Variables["User::FileName"].Value.ToString());
    string StringFileNameExtension = Path.GetExtension(StringExcelFileName);
    if (StringFileNameExtension != ".xls")
    return;
    string StringCSVFileName = (Dts.Variables["User::FileName"].Value.ToString());
    StringCSVFileName = Path.GetFileNameWithoutExtension(StringCSVFileName);
    StringCSVFileName = (Dts.Variables["User::FilePath"].Value.ToString()) + StringCSVFileName + ".csv";
    string StringExcelWorksheetName = (Dts.Variables["User::ExcelWorksheetName"].Value.ToString());
    string StringColumnDelimeter = "|";
    int IntHeaderRowsToSkip = 0;
    //FileStream stream = File.Open(StringFullyQualifiedPathFileName, FileMode.Open, FileAccess.Read);
    //// Reading from a binary Excel file ('97-2003 format; *.xls)
    //IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
    //// Reading from a OpenXml Excel file (2007 format; *.xlsx)
    //IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
    //// DataSet - The result of each spreadsheet will be created in the result.Tables
    //DataSet result = excelReader.AsDataSet();
    //// Free resources (IExcelDataReader is IDisposable)
    //excelReader.Close();
    if (ConvertExcelToCSV(StringExcelFileName, StringCSVFileName, StringExcelWorksheetName, StringColumnDelimeter, IntHeaderRowsToSkip) == true)
    Dts.TaskResult = (int)ScriptResults.Success;
    else
    Dts.TaskResult = (int)ScriptResults.Failure;
    catch (Exception)
    Dts.TaskResult = (int)ScriptResults.Failure;
    public static bool ConvertExcelToCSV(string sourceExcelPathAndName, string targetCSVPathAndName, string excelSheetName, string columnDelimeter, int headerRowsToSkip)
    try
    Microsoft.Office.Interop.Excel.Application ExcelApp = new Microsoft.Office.Interop.Excel.Application();
    Excel.Workbook ExcelWorkBook = ExcelApp.Workbooks.Open(
    sourceExcelPathAndName, // Filename
    0, // UpdateLinks ===> http://msdn.microsoft.com/en-us/library/office/ff194819(v=office.15).aspx
    true, // ReadOnly
    5, // Format ===> http://msdn.microsoft.com/en-us/library/office/ff194819(v=office.15).aspx
    "", // Password
    "", // WriteResPassword
    true, // IgnoreReadOnlyRecommended
    Excel.XlPlatform.xlWindows, // Origin
    "", // Delimeter
    true, // Editable
    false, // Notify
    0, // Converter
    false, // AddToMru
    false, // Local
    false // CorruptLoad
    // Gets the List of ALL Excel Worksheets within the Excel Spreadsheet
    Excel.Sheets ExcelWorkSheets = ExcelWorkBook.Worksheets;
    // Retrieves the Data from the EXACT Excel Worksheet that you want to process from
    Excel.Worksheet ExcelWorksheetToProcess = ExcelWorkSheets.get_Item(excelSheetName);
    // Gets the Range of Data from the EXACT Excel Worksheet that you want to process from
    Excel.Range ExcelWorksheetRange = ExcelWorksheetToProcess.UsedRange;
    // Sets the Cursor/Pointer at the Top Row of the Excel Worksheet
    Excel.Range ExcelRangeCurrentRow;
    // Deletes the Header Row and however many rows as specified in headerRowsToSkip
    for (int ExcelRowCount = 0; ExcelRowCount < headerRowsToSkip; ExcelRowCount++)
    ExcelRangeCurrentRow = ExcelWorksheetRange.get_Range("A1", Type.Missing).EntireRow;
    ExcelRangeCurrentRow.Delete(XlDeleteShiftDirection.xlShiftUp);
    // Replace ENTER, "\n", with a Space " "
    //ExcelWorksheetRange.Replace("\n", " ", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // Replace comma "," with the indicated Column Delimeter variable, columnDelimeter
    ExcelWorksheetRange.Replace(",", columnDelimeter, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    // Saves Data File as .csv Format
    ExcelWorkBook.SaveAs(
    targetCSVPathAndName, // Filename (See http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.workbook.saveas.aspx)
    XlFileFormat.xlCSVMSDOS, // FileFormat
    Type.Missing, // Password
    Type.Missing, // WriteResPassword
    Type.Missing, // ReadOnlyRecommended
    Type.Missing, // CreateBackup
    Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive, // AccessMode
    Type.Missing, // ConflictResolution
    Type.Missing, // AddToMru
    Type.Missing, // TextCodepage
    Type.Missing, // TextVisualLayout
    false // Local
    ExcelWorkBook.Close(false, Type.Missing, Type.Missing);
    ExcelApp.Quit();
    GC.WaitForPendingFinalizers();
    GC.Collect();
    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(ExcelWorkSheets);
    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(ExcelWorkBook);
    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(ExcelApp);
    return true;
    catch (Exception exc)
    Console.WriteLine(exc.ToString());
    Console.ReadLine();
    return true;
    #region ScriptResults declaration
    /// <summary>
    /// This enum provides a convenient shorthand within the scope of this class for setting the
    /// result of the script.
    /// This code was generated automatically.
    /// </summary>
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    #endregion

    I would prefer doing this using a standard data flow task component in SSIS. I will choose an Excel source and a flat file destination for this.
    See how you can handle the inconsistent/embedded delimiters within files inside SSIS data flow
    http://visakhm.blogspot.in/2014/06/ssis-tips-handling-embedded-text.html
    http://visakhm.blogspot.in/2014/07/ssis-tips-handling-inconsistent-text.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for

  • Inventory by LocationId (were locations are hierarchical)

    Hi, I have a problem with an inventory system I'm designing.  It is an inventory system by LocationId.   The problem I have is that the locations are hierarchical.   By hierarchical I mean that a given location might belong to a next location. For ex

  • Internal not getting settled in current year

    I have a issue in settling the Internal order of last year. It gives a n error  saying the period is closed. How can i settle this in current year.Is there any way out please let me know.Error message no AW 624. The fiscal year is closed for last yea

  • Different Document types under one company code

    Hi All, I am working on a project where i have to implement SAP PS in 3 Company codes. I have a requirement that Different number ranges should be used in different codes for creating PRs. In OPTT,order category 20 is used with NB,here i can change 1

  • What happen during shutdown oracle database

    Dear All, i have a questions and i enclosed some suggestions for the answer because I'm confused about the answers : What happens during shutdown oracle database : and the suggested answer : 1- When shutdown the database with NORMAL or IMMEDIATE opti

  • Is there a way to restore the data of a single app instead of my whole previous device from iCloud?

    Just as the title says, is there a method to do so? I have an account in a game that was stored on my previous device which is linked to the device, now that I have a new device I have to start fresh. I would like to recover the data for that 1 accou