How to import Filenames and File creation Date into Table..

Hi Folks,
I am importing Differennt Excels Files into table. my require ment is after importing completed I need to insert all these Filenames ,File creation date into table. (for Auditing).
Can you please give me any ideas or reference link.  Thanks In Advance.

Hi Folks,
I am importing Differennt Excels Files into table. my require ment is after importing completed I need to insert all these Filenames ,File creation date into table. (for Auditing).
Can you please give me any ideas or reference link.  Thanks In Advance.
You can also prepare dir command and then exeucte it by using XP_CMDSHELL. This gives you file name, modified date, creation date information.
Please refer:
https://sqljourney.wordpress.com/2010/06/08/get-list-of-files-from-a-windows-directory-to-sql-server/
https://hernandezpaul.wordpress.com/2013/02/15/store-file-names-and-modified-dates-in-a-table-without-a-foreach-loop-task-sql-server-ssis/
Cheers,
Vaibhav Chaudhari
[MCP],
[MCTS], [MCSA-SQL2012]

Similar Messages

  • How can I change the file creation date?

    I recently downloaded more than 1,000 photos from my vacation. I'm preparing to burn DVDs for a friend, and I noticed that when I copy the photos to the desktop, they don't all have the same date. I have read a couple of discussions here about the difference between photo creation date and file creation date, and I understand the difference. But something seems odd to me.
    For purposes of illustration, let's take two photos: "A" was taken with the camera in the landscape position (how one normally holds a point-and-shoot); "B" was taken with the camera held in the portrait position (rotated 90 degrees). The photos were taken on April 24, about three minutes apart, but not imported into iPhoto until May 19.
    In iPhoto, both files show the actual creation date. Yay!
    The problem is with the files after having been copied to the desktop.
    When copied to the desktop, the info panel for photo "A" shows April 24 for both the "created" and "modified" dates. Photo "B," however, shows May 19 for the "created" and "modified" dates.
    Apparently, when the "B-style" photos were imported into iPhoto, the app automatically rotated them so that they are viewed correctly (without having to turn your head sideways). This is a very nice feature, but the result is that the file date changes.
    Is there any way to change this? I want the DVD to show the date the photo was created, not imported to iPhoto. Picky, I know … but I'm like that. 

    Apparently, when the "B-style" photos were imported into iPhoto, the app automatically rotated them so that they are viewed correctly (without having to turn your head sideways). This is a very nice feature, but the result is that the file date changes.
    Correct.  Your camera has an Auto-Rotate feature. However, the camera does not actually rotate any pixels in the file, but instead flags it with an instruction: "Display me this way". This is a tag in the Exif metadata. When you import a file with this tag iPhoto creates a modified version. It does this because most of the apps that integrate with it -  email clients, word processors etc - simply don't understand this Exif tag. So if you used the shot in a word processing doc, uploaded it to many Web site etc, the shot would come out sideways.
    iPhoto has nothing to say about File dates. There are various file utilities that will edit the dates on Files
    http://www.macupdate.com/app/mac/11143/a-better-finder-attributes
    for instance. But there are otheers, search on  MacUpdate
    Regards
    TD

  • How can i open a DOC or TXT file and insert the data into table?

    How can i open a DOC or TXT file and insert the data into table?
    I have a doc file . the doc include some columns and some rows.(for example 'ID,Name,Date,...').
    I'd like open DOC file and I'd like insert them into the table with same columns.
    Thanks.

    Use the SQL*Loader utility or the UTL_FILE package.

  • How can you determine a file creation date and know if it's been altered since the creation date

    I need to know how to determine a file creation date on an ipad.  If someone creates a document/note on an ipad how can you tell when it was created and if it has been altered since?

    Unless you are using a third party app that provides that functionality, in iOS the only thing youcan access is the last edit/save date and time, which is fairly evident in the user interface for documents and notes. Some apps that handle MS Office files may provide that, but ican't say first hand.

  • How can I get the File Creation Date OR Last modification date of the incoming file in my message?

    I need the Last Modification Date and the File creation date of the consumed file in my message, is it possible to do that using a custom pipeline component in decode stage or any other way? The FILE namespace have File creation time that actually gives
    the time the file was dropped in receive location, not the actual creation time. Also this namespace doesn't have the Last Modification Date.

    Yes,
    As per MSDN, "File.FileCreationTime" - "Defines the time that the file was written to the folder that is monitored by the File receive
    adapter."
    So for File Modified DateTime, only option I can think of is create a custom file adapter (updating the File Adapter code from SDK ..\SDK\Samples\AdaptersDevelopment\File Adapter) and access the received file with the code something like the following, which
    you give you the Last Modified date
    string sLastModifiedDate = File.GetLastWriteTime(path).ToString();
    If there are any business requirements which drives you this, then this the only way I can think of. Because you can access the file properties only in adapter, when it passes through adapter file is handled as stream and you will only have context properties
    to access the file related properties.
    If you're looking for implement this for any audit purpose or for your any technical purpose, then you can suggest some alternate than using File updated datetime.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How do I put and sort string data into an array?

    I have a txt file that has the following sample data:
    Sample.txt----
    Jones Bill 12,500 Salesperson
    Adams Frank 34,980 Manager
    Adams John 23,000 Salesperson
    Thompson Joe 59,500 Trainee
    I need to incorporate each line of data into an individual array element, while using a user-defined method
    (ex. setAllValues(String last, String first, String salary, String job)
    How do I loop the data into the array to be displayed and what is the best way to do sorts on this sample data. Any code or clues would be super helpful.
    Sanctos

    If you set up an array of Strings you can use the java.util.Arrays.sort() method to sort it. If you need to sort arbitrary Objects (i.e. your 3 strings as a whole entity) your 3-way object will have to either implement Comparable or you could write a Comparitor class to do the ordering. Not much to it, though.
    Dom.

  • How to import songs AND all the data from iPod to iTunes?

    Hi,
    I am looking for a tool that can import more than just the music from iPod to iTunes. I have tried several apps to no avail. (many mentioned in another post here: http://discussions.apple.com/thread.jspa?threadID=1576568&tstart=15 )
    I "upgraded to iTunes 9", but then my library disappeared the other night. All my music and video files are there intact, but the iTune Library.itl was wiped.
    It gets even worse. Not knowing iTunes had lost my iTunes Library.itl content, I accidentally deleted all of the old library files (stored under "Previous iTunes Libraries" folder) and then de-fragmented my computer. So now the ".itl" file cannot be recovered in anyways as every data block on the HDD is overwritten.
    Adding the music folders back into iTunes does NOT transfer all the metadata (play count, last played, rating, genre, last skipped, times skipped, track number, comments, artwork, lyrics, etc.). This information is VERY important if you have over 5k songs like I do.
    Alas, there is another way to recover my library file. All this metadata information (as well as the music and video files) are available on my classic iPod with its massive hard drive.
    The challenge is finding a tool that would transfer the metadata as well. And so far after trying 6 different titles none transfers all the metadata. They all change the "Date Added" field with today's date. The ideal tool needs to keep that field same as it is on the iPod.
    These are the ones I tried:
    -iPodAccess
    -CopyTrans
    -iDump
    -PodtoPC
    -TouchCopy09
    -iPodCopy
    Does anyone know a tool that would move all the information from my iPod to a new iTunes?
    Thanks

    Aniosoft iBackup Pro seems to be very user-friendly, but it's costly though, $40. http://www.aniosoft.com
    They have a free trial version where you can backup 6 songs from each playlist, so try it out if you think it's worth it.

  • How can I change the file creation date through Labview 2012?

    I want to change the format of the data stored in some text files, but I want the file dates to remain the same.  Currently, my program creates the files with new dates.
    Solved!
    Go to Solution.

    LabVIEW to my knowledge doesn't have native functions to do this.
    You can use .NET functions on Windows to get/set the CreationTime, LastWriteTime and LastAccessTime.
    See attached VI (LabVIEW 8.6)
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness
    Attachments:
    dotNET File Timestamp.vi ‏14 KB

  • How to convert an XML file (input data) into a SOAP message?

    Hi there,
    I recently wrote a dummy program to retrieve data from a web service. The program simply read from an input file (the xml content) and send it to the web service, the return result is store in a file (xml). I wish to 'upgrade' this approach of reading and writing from/to a file and have it done by SOAP. For some reason, I'm unable to do so.
    The data on the xml input file that I sent is this:
    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
    <Upgrade xmlns="http://tempuri.org/">
    <upgrade>
    <User>John</User>
    <Password>javalava</Password>
    <EmployeeId>77384</EmployeeId>
    <Rank>Q6</Rank>
    </upgrade>
    </Upgrade>
    </soap12:Body>
    </soap12:Envelope>
    When trying to upgrade to SOAPEnvelope it fails.
    Thanks for any pointers!!!

    I was trying (unsuccessfully) g to write something like this
    * sorry I don't know what are the tags for <code></code>
    <code>
    public static SOAPMessage prepareMessage(String username, String password, String emplID) throws SOAPException
         SOAPMessage soapMsg = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL).createMessage();
    // SOAP body
    String prefix = "tns";
    String uri = "http://tempuri.org/Upgrade";
    SOAPEnvelope envelope = soapMsg.getSOAPPart().getEnvelope();
    SOAPBody body = envelope.getBody();
    SOAPBodyElement service = body.addBodyElement(envelope.createName("Upgrade", prefix, uri)); //there are 2 Upgrade in the XML (Upgrade and another upgrade, but I couldn't figure out how to that here)
    SOAPElement symbol = service.addChildElement(envelope.createName("User", prefix, uri));
    symbol.addTextNode(username);
    symbol = service.addChildElement(envelope.createName("Password", prefix, uri));
    symbol.addTextNode(password);
    symbol = service.addChildElement(envelope.createName("EmployeeId", prefix, uri));
    symbol.addTextNode(emplID);
    return soapMsg;
    </code>

  • How to parse XML and store the data in  tables using sql or plsql?

    I want to parse the xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <xmlListWrapper>
        <size>2</size>
    <AppTypeID>10</AppTypeID>
    </xmlListWrapper>
    and store in a table
    |pk|apptypeid|
    1     10

    You can extract data from your XML along these lines...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select xmltype('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      2  <xmlListWrapper>
      3    <size>2</size>
      4    <AppTypeID>10</AppTypeID>
      5    <AppTypeID>20</AppTypeID>
      6  </xmlListWrapper>') as xml from dual)
      7  --
      8  -- end of example data
      9  --
    10  select x.*
    11  from   t
    12        ,xmltable('/xmlListWrapper/AppTypeID'
    13                  passing t.xml
    14                  columns pk for ordinality
    15                         ,apptypeid number path '.'
    16*                ) x
    SQL> /
            PK  APPTYPEID
             1         10
             2         20
    SQL>
    Inserting it to a table is obviously achieved using an INSERT ... SELECT ... where the SELECT is extracting the data from the XML.

  • Need little help with JPA code and displaying database data into tables

    Hello Everyone,
    I am using java6 and Netbeans 6.1 on Windows XP platform.
    This is probably very simple but have'nt been able to figure it out yet. I am using the Travel Java Databse included in NB6 as a learning tool.
    I have a JComboBox connected to Person Table and want to display a Trip table from using the selected item from theJcombobox. In other words, Trip table shows only the Person selected from the Jcombobox.
    If someone could point me on the right direction how to code JPA code or how to use NB6 GUI to accomplish this.
    Thanks

    The w and wi are just table aliases that make it easier to
    referrence those tables by column when joining multiple tables
    (avoids having to prefix column names with the entire table name,
    etc.) When doing a self-join (joining a table to itself), the use
    of table aliases is
    required, otherwise you would have no other way to tell
    which column belonged to which "instance" of table.
    The query itself is pretty simple. It is just using a
    correlated subquery to select only those instances of
    workstationApps where the count of appID instances in
    workstationAppIndex is less than the amount specified in the
    maxConcurrentInstalls for the same appID.
    Also, I do see what you are doing with #form.searchType#, I
    was just making sure that it was what you really intended to do.
    Phil

  • (Urgent help needed) how to read txt file and store the data into 2D-array?

    Hi, I have a GUI which allow to choose file from the file chooser, and when "Read file" button is pressed, I want to show the array data into the textarea.
    The sample data is like this followed:
    -0.0007     -0.0061     0.0006
    -0.0002     0.0203     0.0066
    0     0.2317     0.008
    0.0017     0.5957     0.0008
    0.0024     1.071     0.0029
    0.0439     1.4873     -0.0003
    I want my program to scan through and store these data into 2D array.
    However for some reason, my source code issues errors, and I don't know what's wrong with it, seems to have a problem in StringTokenizer though. Can anybody help me?
    Thanks in advance.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.StringTokenizer;
    public class FileReduction1 extends JFrame implements ActionListener{
    // GUI features
    private BufferedReader fileInput;
    private JTextArea textArea;
    private JButton openButton, readButton,processButton,saveButton;
    private JTextField textfield;
    private JPanel pnlfile;
    private JPanel buttonpnl;
    private JPanel buttonbar;
    // Other fields
    private File fileName;
    private String[][] data;
    private int numLines;
    public FileReduction1(String s) {
    super(s);
    // Content pane
         Container cp = getContentPane();
         cp.setLayout(new BorderLayout());     
    // Open button Panel
    pnlfile=new JPanel(new BorderLayout());
         textfield=new JTextField();
         openButton = new JButton("Open File");
    openButton.addActionListener(this);
    pnlfile.add(openButton,BorderLayout.WEST);
         pnlfile.add(textfield,BorderLayout.CENTER);
         readButton = new JButton("Read File");
    readButton.addActionListener(this);
         readButton.setEnabled(false);
    pnlfile.add(readButton,BorderLayout.EAST);
         cp.add(pnlfile, BorderLayout.NORTH);
         // Text area     
         textArea = new JTextArea(10, 100);
    cp.add(new JScrollPane(textArea),BorderLayout.CENTER);
    processButton = new JButton("Process");
    //processButton.addActionListener(this);
    saveButton=new JButton("Save into");
    //saveButton.addActionListener(this);
    buttonbar=new JPanel(new FlowLayout(FlowLayout.RIGHT));
    buttonpnl=new JPanel(new GridLayout(1,0));
    buttonpnl.add(processButton);
    buttonpnl.add(saveButton);
    buttonbar.add(buttonpnl);
    cp.add(buttonbar,BorderLayout.SOUTH);
    /* ACTION PERFORMED */
    public void actionPerformed(ActionEvent event) {
    if (event.getActionCommand().equals("Open File")) getFileName();
         if (event.getActionCommand().equals("Read File")) readFile();
    /* OPEN THE FILE */
    private void getFileName() {
    // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
    if (result == JFileChooser.APPROVE_OPTION)
         fileName = fileChooser.getSelectedFile();
    textfield.setText(fileName.getName());
         if (checkFileName()) {
         openButton.setEnabled(false);
         readButton.setEnabled(true);
         // Obtain selected file
    /* READ FILE */
    private void readFile() {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines();
         data = new String[numLines][];
         // Read file
         readTheFile();
         // Output to text area     
         textArea.setText(data[0][0] + "\n");
         for(int index=0;index < data.length;index++)
    for(int j=1;j<data[index].length;j++)
    textArea.append(data[index][j] + "\n");
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines() {
    int counter = 0;
         // Open the file
         openFile();
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile();
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* READ FILE */
    private void readTheFile() {
    // Open the file
    int row=0;
    int col=0;
         openFile();
    System.out.println("Read the file");     
         // Loop through file incrementing counter
         try {
    String line = fileInput.readLine();
         while (line != null)
    StringTokenizer st=new StringTokenizer(line);
    while(st.hasMoreTokens())
    data[row][col]=st.nextToken();
    System.out.println(data[row][col]);
    col++;
    row++;
    closeFile();
    catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile();
         System.exit(1);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName() {
         if (fileName.exists()) {
         if (fileName.canRead()) {
              if (fileName.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* FILE HANDLING UTILITIES */
    /* OPEN FILE */
    private void openFile() {
         try {
         // Open file
         FileReader file = new FileReader(fileName);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File opened");
    /* CLOSE FILE */
    private void closeFile() {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    /* MAIN METHOD */
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException {
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Java.lang.NullpointException
    at FileReductoin1.readTheFile <FileReduction1.java :172>
    at FileReductoin1.readFile <FileReduction1.java :110>
    at FileReductoin1.actionPerformed <FileReduction1.java :71>
    .

    1) Next time use the CODE tags. this is way too much unreadable crap.
    2) The problem is your String[][] data.... the only place I see you do anything approching initializing it is
    data = new String[numLines][];I think you want to do this..
    data = new String[numLines][3];anyway that's why it's blowing up on the line
    data[row][col]=st.nextToken();

  • IPhoto file creation date inconsistencies during drag and drop

    I have noticed that if I drag and drop a photo from iPhoto to Finder, the file creation dates in Finder are inconsistent.
    (This question is related to drag and drop only and not File->Export, which always uses the export date and timestamp for the file creation date and thus does not suit my needs).
    TEST A -- If the EXIF DateTimeOriginated is 01/01/2013, and today's date is 03/03/2013, then:
    In some cases when I drag a file to Finder, the EXIF date is used as the file modification/creation date in Finder
    In some cases, today's date is used as the file modification/creation date in Finder
    In some cases, a date in between the EXIF date and today's date is used
    It appears that for case A1, these are files that do not have a modified copy.  That is, if you select the photo in iPhoto and then click "File" -> "Reveal In Finder", the "Modified File" choice will be greyed out.
    For cases A2 & A3, iPhoto has inexplicably decided to create modified versions of these files either today or sometime in the past.
    TEST B -- I have read that unexplained modifications are tied to the auto-rotate function in cameras, and it does seem to be the case when I performed the test below:
    Select a large group of landscape format photos (these would not have been auto-rotated), then drag and drop to Finder.  The file creation dates are set to the EXIF date
    Add some portrait photos to the group in (1).  Now the file creation date of ALL photos including the non auto-rotated photos are set to the current date
    The behaviour in B2 is clearly wrong, since the landscape photos should be the same as in B1.  This is bug #1.
    Furthermore, iPhoto appears to be inconsistent with when these modifications are made.  For example, I dragged & dropped an auto-rotated photo on 02/02/2013, then dragged & dropped it again today, then the file creation date in Finder (and also the date of the modified file in iPhoto, as shown in iPhoto File->Reveal In Finder->Modified File) can either the EXIF date (01/01/2013), the late of the last drag & drop (02/02/2013), or today's date (03/03/2013); there does not appear to be any rhyme or reason to this.  This is bug #2.
    In any case, saying "you should never use drag & drop in iPhoto" (as I have read in some other forum posts) isn't a solution, because Apple should either (a) support this function correctly or (b) remove it altogether.  Furthermore, I regularly burn photos to disk for others so having the file date and timestamps correctly set to the EXIF date helps keeping the photos sorted in the directory listings for multiple OS, so File->Export isn't a solution.

    File data is file data. Exif is photo data. A file is not a photo.  It's a container for a photo.
    When you export you're not exporting a file. You're exporting a Photo. The medium of export is a new file. That file is created at the time of export, so that's its creation date. The Photo within that file is dated by the Exif.
    There are apps that will modify the file date to match the Exif.
    The variation you're seeing is likely due to the changes in how the iPhoto library works over the past few versions. Drag and drop is handy, but is not a substitute for exporting, nor intended to be.

  • Get the file creation date

    hi friends..
    i searched many forums to get file creation date
    i didnt get the solution but i found one program which execute
    dos command and gets the output of that.
    so using that program i developed a program to get the file creation Date & Time also
    //getCreationDate.java
    import java.io.*;
    import java.lang.*;
    public class getCreationDate {
    public static void main (String args[]){
      try {
         // get runtime environment and execute child process
         Runtime systemShell = Runtime.getRuntime();
          BufferedReader br1=new BufferedReader(new InputStreamReader(System.in));
          System.out.println("Enter filename: ");
          String fname=(String)br1.readLine();
         Process output = systemShell.exec("cmd /c dir "+fname);
           // open reader to get output from process
         BufferedReader br = new BufferedReader (new InputStreamReader(output.getInputStream()));
         String out="";
          String line = null;
          int step=1;
          while((line = br.readLine()) != null )
                if(step==6)
               out=line;
                step++;
                }          // display process output
          try{
          out=out.replaceAll(" ","");
          System.out.println("CreationDate: "+out.substring(0,10));
          System.out.println("CreationTime: "+out.substring(10,16)+"m");
          catch(StringIndexOutOfBoundsException se)
               System.out.println("File not found");
       catch (IOException ioe){ System.err.println(ioe); }
       catch (Throwable t) { t.printStackTrace();}
    }

    Following line should be modified to make it work on all platforms:
    Process output = systemShell.exec("cmd /c dir "+fname);

  • How to import an Excel file

    Hi ,
    I amwriting a BDC Program..
    How to import a Excel File by Browsing the Excel file from the Directory and Storing that values in the internal table.
    Can any one send the code for this,
    Points will be awarded.
    Regards,
    Jayasimha Jangam.

    Hi,
          Create a select parameter. at selection screen, use FM F4_FILENAME to get the dialog box.
    see the sample code.
    *&      Form  display_dialog
          To display the pop up dialog box
    FORM display_dialog.
    Calling FM to display File Select dialog box
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
        FIELD_NAME          = ' '
       IMPORTING
         file_name           = p_file .
    ENDFORM.                    " display_dialog
    FORM upload_data.
      DATA : lt_itab   TYPE STANDARD TABLE OF alsmex_tabline,
             ls_itab   TYPE alsmex_tabline,
             ls_upload TYPE ty_upload_data.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = p_file
                i_begin_col             = 1
                i_begin_row             = 2
                i_end_col               = 5
                i_end_row               = 50000
           TABLES
                intern                  = lt_itab[]
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        MESSAGE i000 WITH text-t04.
        LEAVE LIST-PROCESSING.
      ENDIF.
      CLEAR ls_itab.
      LOOP AT lt_itab INTO ls_itab.
        CASE ls_itab-col.
          WHEN 1.
            ls_upload-matnr = ls_itab-value.
          WHEN 2.
            PERFORM convert_to_decimal USING ls_itab-value.
            ls_upload-bmeng = ls_itab-value.
          WHEN 3.
            ls_upload-idnrk = ls_itab-value.
          WHEN 4.
            PERFORM convert_to_decimal USING ls_itab-value.
            ls_upload-menge = ls_itab-value.
          WHEN 5.
            ls_upload-meins = ls_itab-value.
        ENDCASE.
        AT END OF row.
          APPEND ls_upload TO gt_upload.
          CLEAR ls_upload.
        ENDAT.
        CLEAR ls_itab.
      ENDLOOP.
    Deleting the contents of internal table
    FREE lt_itab.

Maybe you are looking for