+ Reply to Thread
Results 1 to 6 of 6

Thread: Columnar block operations

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Los Angeles, CA

    Post Columnar block operations

    Currently, I am working with tabular data in a spreadsheet using Microsoft Excel.
    The data is being saved in the Text Tab Delimited format.
    When the data is imported into V edit the data is not in tabular format such that text in adjacent columns
    have a flush right margin to one another.

    I am working with the MICROSOFT WINDOWS 7 operating system.

    Is there a procedure for working with spreadsheet data in order to take advantage of the columnar block?
    capabilities of Vedit?

    I've include screen dumps of the data.

    Please advise.

  2. #2
    Use the menu command { Edit > Convert > CSV to flat... }.
    The macro should automatically detect the TAB delimiter, so you only need to click OK to covert the file into tabular format.

    Maybe correct place for this thread is in the "Converting, Translating" forum.
    Pauli -- Using Vedit 6.24.2 on Windows 7 Enterprise (64 bit) and on Windows 10 (64 bit)

  3. #3
    Senior Member
    Join Date
    Aug 2011
    British Columbia, Canada
    Hi Olazarre,

    1. In MS Excel, select a block and copy it to the clipboard.

    2. Make a note of the width of the widest column in the block

    3. open vedit

    4. Select from the menu: config > Tab/Fill

    5. in the Interval/list box, enter the widest column width from step 2, & exit menu

    6. from the edit menu, select: Paste columnar clipboard

    Does that give you the result, you want?

    Using Vedit 6.21.3, (32 bit), dated 9/12/11 running on Windows 7 (64 bit).

  4. #4
    As Scott mentioned the problem is that the default tabs do not cause the correct columnar display.

    Many years ago I wrote some macros to automatically calculate tab widths.
    I haven't actually used this for years (since I have retired I don't need to work with much tabbed data), but I think I had this macro (and its mate) mapped to keyboard shortcuts.

    There was some discussion of this on the old BB.

    Look at:-


    I am sure I also had a macro to get the widths from the 1st (header) line and apply to the tabs.
    Ian Binnie

  5. #5
    In 2004 I wrote a macro to convert CSV data to TAB delimited data and to set VEDIT's Tabs accordingly:


    It has been a quick hack, though.
    The delimter is hardcoded (but changeable of course) and it's limited to 32 TABs in that old version (due to Vedit's limit that time).
    The fields in a column are lined up on the left.

    There are more TAB-related macros on my site http://www.ziemski.net/vedit/conversions.html,
    for example several versions of "tab2fix.vdm",
    discussed on the old (now archived) Vedit WebBoard, here: (http://www.ziemski.net/archive -- "VEDIT Technical Support" -- "Converting, Translating" --"Converting Excel tab file to fixed length") or directly: http://www.ziemski.net/archive/threads/039-018292.html

    For TAB handling in general I have the following macro in my Vedit.key file:

    Ctrl-Shft-Q        [VISUAL EXIT] Save_Pos() #103=CL #104=0 OR(103) BoL Repeat(ALL){ if(CC=='"'){S('"', ADVANCE+NOERR+COUNT, 2)} S("|X", ADVANCE) if(CL==#103  && (!At_EoL)){#105=Cur_Col if(#105>65535){break} TC(32) NT(#105,LEFT+NOCR) #104++ if(#104>256){break}}else{break}} OR(CLEAR) if(#104>0){if(#104==1){OR(103) NT(#105,NOCR) NT(#105, NOCR) OR(CLEAR)} RS(103,"Config_Tab(", INSERT) RS(103,")",APPEND) Call(103)} Restore_Pos()
    If I have TAB delimited data I insert a manual "ruler" line at the beginning and type for example an "x" for every TAB column begin I want to have displayed in Vedit.
    Calling above key macro then sets Vedit's TAB widths according to the ruler line which can be finally deleted.

    Perhaps that helps a bit.

    Last edited by chriz; September 28th, 2012 at 09:47 AM.
    Used VEDIT for more than 20 years, finally 6.24.1 on Windows 7. Now I'm on Linux, without VEDIT...

  6. #6
    Junior Member
    Join Date
    Sep 2012
    Los Angeles, CA
    I am currently reviewing the suggestions posted thus far. Thank you. I will post my outcome as I continue to tackle this issue. Best Regards, Oli,

+ Reply to Thread

Tags for this Thread

Posting Permissions

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