• 28 Apr

    XLS as Destination

    Dear Users,

    Version v2019.4.27.0

    On user request we’ve added an option to convert xls files. At the moment the setup is only available from the Remote Setup tool (WebRemote will follow soon).

    The request we got was to convert xls(x) to csv (txt based) without Excel being installed but also other conversions are possible (xls tot xlsx, xlsx to xls, …).

    File Format possibilities:

    • Automatic, Automatically detect the type of the file when opening files.
    • Xls, Excel 97-2000-XP-2003
    • Text, Delimiter separated values. Depending on the delimiter, this can be csv, tab delimited text, etc.
    • Pxl, Pocket Excel 1.0 or 2.0
    • Xlsx, Excel 2007 standard file format. Note that this is *not* a macro enabled file format. If you want to save a file with macros, you need to use Xlsm instead.
    • Xlsm, Excel 2007 macro enabled file format.

    Sheet Name = Name of the sheet that needs to be converted

    Encoding = Encoding for the generated file, when writing a Text-delimited file (csv or txt). This parameter has no effect on xls/x files.

    • UTF8
    • UTF7
    • Unicode
    • Default
    • BigEndianUnicode
    • ASCII
    • ANSI

    Delimiter = Delimiter Char to use if Format Text ( #09 = Tab )

    Don’t forget to set the Filename filter to include the file types you want to convert.

    Further options like delete sheet(s), delete column(s),  renaming of cell values, .. are on our todo list.

    Regards,

    Limagito Team

    By Limagito-Team XLS/CSV ,
  • 24 Apr

    Pascal Script, User Request Example No 2

    Dear users,

    Second Pascal Script is based on the following user request:

    We need some help on setting up a rule.  The rule we are trying to setup is as follow. Source folder has files in it, example file names ABC-test.txt, 123_test.txt, and test_XYZ.txt.  We have a destination folder called “Test”, and we have 3 folders under it called ABC, 123, and XYZ.  We want the rule to separate the files and place them in their specified folders.  For example, file ABC-test.txt will be placed into folder ABC, 123_test.txt file will be placed into folder 123, and text_XYZ.txt file will be place into folder XYZ.  We want the files to be moved into the separated folders that matches their name.

    > Add your Destination:

    > Destination Setup, change the ‘Create Subdir, opt.’ to %VSB

    > Add the following ‘On Rule Begin’ Pascal Script. Very important: the ctOutputPath contant must be the same as your destination path (first screenshot) !

    Var
      iList: Integer;
      tmpSub: String;
      tmpList: TStringList;
    Const
      ctOutputPath = 'C:\Test\Out\';
    Begin
      psExitCode:= 1;
      // ... add your code here
      psVSA := '';
      tmpList := TStringList.Create;
      Try
        psListPaths(ctOutputPath, '*.*', 0, tmpList);
        for iList := 0 to (tmpList.Count-1) do
        Begin
          tmpSub := tmpList.Strings[iList];
          tmpSub := psStringReplace(tmpSub, ctOutputPath, '');
          tmpList.Strings[iList] := tmpSub;
        End;
        psVSA := tmpList.CommaText;
        // Debug
        psLogWrite(1, '', 'SubFolder found: ' + psVSA);
      Finally
        tmpList.Free;
      End;
    End.
    > Add the following ‘On Destinations‘ Pascal Script.
    Var
      iList: Integer;
      tmpSub: String;
      tmpList: TStringList;
    Const
      ctOutputSubPathNone = 'None\';
    Begin
      psExitCode:= 1;
      // ... add your code here
      psVSB := ctOutputSubPathNone;
      // Iterate
      tmpList := TStringList.Create;
      Try
        tmpList.CommaText := psVSA;
        tmpList.Sort;
        for iList := (tmpList.Count-1) downto 0 Do
        Begin
          tmpSub := tmpList.Strings[iList];
          tmpSub := psStringReplace(tmpSub, '\', '');
          psLogWrite(1, '', 'Sub: ' + tmpSub);
          If Pos(LowerCase(tmpSub), LowerCase(psFileName)) <> 0 Then
          Begin
            psVSB := tmpSub;
            Break;
          End;
        End;
        // Debug
        psLogWrite(1, 'Destination SubFolder will be: ', psVSB);
      Finally
        tmpList.Free;
      End;
    End.

    If you have any question about this example, don’t hesitate to ask.

    Regards,
    Limagito Team

    By Limagito-Team Pascal Script ,
  • 15 Apr

    Icon Legend

    Dear Users,

    We often get questions about the color of a certain icon in the Rule list. The following icon legend is available under the Help menu item.

    Mostly users ask about the orange color. The icon turns orange when an error occurs. You can reset this status with a right click on the Rule and click ‘Reset Info Status’. To disable this this behaviour, right click on the Rule ans select ‘Disable Info Status’.

    Regards,

    Limagito Team

    By Limagito-Team Remote Tool
1 2
SEARCH