XLS/CSV

  • 26 Apr

    Source file parsing and vlookup configuration

    Q: Source file parsing request:
    It was a pleasure meeting you this morning, we had a productive time upgrading our lower-environment server.
    Now, I have a specific requirement, I want to know if this is doable in Limagito?
    I have attached 3 source log files, and an Excel file for lookup values.
    Let me know what is possible and what isn’t.
    Your help would be appreciated.
           Requirement is.
    1. Get a portion of the sourcefilename
      -Filename is: 3294006586260310100730.log
      -get 7th position and is 4 digits in length (is the instrument-Slno)
      -Lookup for slno in the csv file for a possible match
      -in the 1st column (match just the 1st 4 digits alone)
      -and get the associated value in the 2nd column.             (VAR-1)
      -if there isn’t a match, then assign ‘Default‘ to VAR-1
    2. Open source-file
      -and lookup for a static-string ‘Donation ID’:
      -and get the associated value which is on the same line. (VAR-2)
      -if there isn’t a match, then assign ‘None‘ to VAR-2
      -if there are any backward or forward slashes within the value, replace it with space
    3. Rename the Target file name.
      -with the original Primary name
      -and suffix it with ‘-‘
      -and suffix it with (VAR-2)
      -and suffix it with ‘-‘
      -and suffix it with (VAR-1)
      -File Extension should be ‘.TXT
    1. Create a folder with the name (VAR-1) on the Target path and drop the associated renamed file in it.

    A: Yes this is possible using our srcipting option.

    • The Source must be a Windows folder (or share):

    limagito filemover windows folder or share as source

    • As file filter we used *.log because we only need to search for log files:

    limagito filemover file filter setup

    • Open our Pascal Script option:

    limagito filemover pascal script option

    • Enable and add the following ‘On Rule Begin’ script:
      • This script will load the content of the ‘AssetID_with_SerialNumber.csv’ file. You can adjust the ctCsvFile const if needed.
      • It must be a csv file
      • You can download the script here

    limagito filemover pascal script source file parsing

    • Funtion setup:
      • We are using ‘Move Files’ in our test setup
      • If you want to keep the files in the source then
        • Select ‘Copy Files’ instead
        • Enable our File Memory option! This way we will only copy the same file once.

    limagito filemover function setup

    • Destination Setup
      • First Destination MUST be our Pascal Script option
      • Second Destination is the destination folder of moved log files

    limagito file mover destination setup

    • First Destination: Pascal Script
      • You can download the script here
      • The script will strip an ID from the source filename (Char 7 – 10)
      • This ID will be used to get the ‘AssetID’ from the csv file
      • AssetID will be used to parse the source file for the ‘Donation ID’ information
        • / and  \ will be replaced with a space
        • Invalid directory char will be removed

    limagito filemover source file parsing

    • Second Destination: We used a Windows Folder but can be any other destination type

    limagito file mover windows folder as destination

    • Adjust ‘Create Subdir, opt.’ to:  %VSB\%SFS
      • %VSB var contains the AssetID parsed from the csv file

    limagito filemover file and directory setup

    • Enable ‘Rename Files during Copy/Move’ option:

    limagito filemover file renaming option

    • File Rename setup:
      • RegEx:  (.*)\.(.*)
      • Replacement:  \1-%VSC-%VSB.log
        • Filename will be renamed and extension will change from .log to .txt

    limagito filemover file renaming setup

    • RunTime Log result:

    limagito file mover runtime log result

    If you need any help about this ‘source file parsing’ request, please let us know.

    Best Regards,

    Limagito Team

    #csv #managedfiletransfer #filetransfer #filemanagement #limagito

  • 28 Jan

    How to convert excel and csv files to pdf

    Q: We need a way to convert excel and csv files to pdf. Can this be done using Limagito File Mover.

    A: Yes this is possible using our XLS as Destination option (with recent versions of Limagito File Mover, v2026.1.27.0 and up)

    • In our example we used a Windows Folder as Source. In this folder we’ll be able to drop almost any kind of image file type and it will be converted to pdf.

    limagito file mover windows folder as source

    • We’ve set a timer to scan this folder every 30 seconds:

    limagito file mover schedule setup

    • Function is set to Move, so after a successful conversion the source file will be deleted. If you want to keep the source files, leave the function to ‘Copy Files’ and enable our ‘File Memory’ option to prevent us converting the same source file over and over again.

    limagito file mover function setup

    • As Destination we added our [XLS] option
      • Set the destination for the converted xls / csv files

    limagito file mover xls as destination

    • Switch to PDF tab and enable ‘Export to Pdf’
      • Autofit Columns will adjust the columns so all cell/csv field values will be fully visible in the pdf
      • Autofit Column Adjustment will add some extra space between the Columns (100 = 100%)
      • Print To Fit
        • When ‘enabled’ you can use:
          • Number Of Horizontal Pages
          • Number Of Vertical Pages
        • When ‘disabled’ you can use:
          • Print Scale (100 = 100%)

    limagito file mover convert excel and csv files

    • Don’t forget to Enable the Rule after your setup so it will start scanning

    limagito file mover enable or disable rule

    If you need any help about this ‘week number from filename’ question, please let us know.

    Best Regards,

    Limagito Team

    #xls #pdf #managedfiletransfer #filetransfer #filemanagement

  • 12 Oct

    Excel as destination losing some rows of data when converting from csv

    Excel as destination losing some rows of data when converting from csv

    Q: We are running LimagitoX File Mover v2024.1.20.0 and noticed an issue with the Excel destination. It appears to be losing some rows of data starting after line 45. You can replicate this issue by creating a simple rule that uses the attached test_file.txt file as the source and set the destination as Excel with the options in the images below. Note that the text input file has 101 rows, and the Excel output file only has 57. We are still seeing this issue with version 2024.8.26.0. Didn’t want it to fall off your radar.

    A: We added the following Pascal Script which will convert your source Ansi csv file to Unicode.

    • Open our Pascal Script option:

    limagito file mover pascal script option

    • Enable and Add the following ‘On Destination’ Pascal Script:
    Begin
      psExitCode:= 1;
      // ... add your code here
      psChangeTxtEncoding(psFilePath + psFileName, psFilePath + psFileName, 2);
    End.

    This will adjust the source txt file so if you don’t want this, add an extra Rule where you use a copy of the original file.

    limagito file mover Excel as destination losing some rows

    Feedback Customer: That fixed it. Thank you!

    If you need any help with this ‘send an email when a file is successfully transferred’ request, please let us know.

    Best Regards,

    Limagito Team

    #xls #managedfiletransfer #filetransfer #filemanagement

    By Limagito-Team XLS/CSV , ,
1 2 3 4 5
SEARCH