+ Reply to Thread
Results 1 to 5 of 5

Import/Convert into excel sheet..!!!

  1. #1
    Registered User
    Join Date
    09-23-2010
    Location
    Dhaka
    MS-Off Ver
    Office 2010
    Posts
    7

    Import/Convert into excel sheet..!!!

    How to convert below values into excel worksheet cell (column & row) by using excel macro.. like the below...plz help....

    {data:[
    {"compname":"1STBSRS","sector":"Investment","cat2":"DA","nav":139.55,"fvml":"100/50","lagm":"2010-04-01","ldiv":"15% : 609"},
    {"compname":"1STICB","sector":"Investment","cat2":"DA","nav":3217.58,"fvml":"100/5","lagm":"2010-08-12","ldiv":"400% : 610"},
    {"compname":"1JANATAMF","sector":"Investment","cat2":"DA","nav":.00,"fvml":"10/500","lagm":"2010-11-09","ldiv":" : "},
    {"compname":"2NDICB","sector":"Investment","cat2":"DA","nav":480.33,"fvml":"100/5","lagm":"2010-08-12","ldiv":"200% : 609"},
    {"compname":"3RDICB","sector":"Investment","cat2":"DA","nav":415.05,"fvml":"100/5","lagm":"2010-08-12","ldiv":"140% : 609"},
    {"compname":"4THICB","sector":"Investment","cat2":"DA","nav":586.36,"fvml":"100/10","lagm":"2010-08-12","ldiv":"125% : 609"},
    {"compname":"5THICB","sector":"Investment","cat2":"DA","nav":508.06,"fvml":"100/10","lagm":"2010-08-12","ldiv":"100% : 609"},
    {"compname":"6THICB","sector":"Investment","cat2":"DA","nav":196.03,"fvml":"100/10","lagm":"2010-08-12","ldiv":"75% : 609"},
    {"compname":"7THICB","sector":"Investment","cat2":"DA","nav":271.70,"fvml":"100/50","lagm":"2010-08-12","ldiv":"70% : 609"},
    {"compname":"8THICB","sector":"Investment","cat2":"DA","nav":215.35,"fvml":"100/50","lagm":"2010-08-12","ldiv":"65% : 609"},
    {"compname":"ABBANK","sector":"Bank","cat2":"DA","nav":298.68,"fvml":"100/5","lagm":"2010-07-15","ldiv":"20%, 25%B : 1209"},
    ],recordType : 'object'}


    Excel sheet:

    A B C D E F G
    1 compname sector cat2 nav fvml lagm ldiv
    2 1STBSRS Investment DA 139.55 100/50 40269 0.15
    3 1STICB Investment DA 3217.58 100/5 40402 4
    Last edited by MTHassan; 11-09-2010 at 04:09 PM.

  2. #2
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Childers QLD, Australia
    MS-Off Ver
    Excel 2003, 2007 & 2013
    Posts
    128

    Re: Import/Convert into excel sheet..!!!

    Hi,

    A very basic way is to use 2 functions.

    "Data" - "Text to Columns", using "," as a delimiter.

    Plus use Control H to Replace All unwanted data in columns.

    Then just modify to suit.

    Cheers

    Tony

  3. #3
    Registered User
    Join Date
    09-23-2010
    Location
    Dhaka
    MS-Off Ver
    Office 2010
    Posts
    7

    Re: Import/Convert into excel sheet..!!!

    "Data" - "Text to Columns" is not helping properly...
    I need a macro to convert it to column...

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Import/Convert into excel sheet..!!!

    Record a macro using Data - text to columns

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,951

    Re: Import/Convert into excel sheet..!!!

    You need to use two delimiters; put a tick in the box for comma and then, in other, put ":" without the quote marks.

    If you output to the next column, that is, if your data is in column then output to column B, you will not overwrite the data at this stage ... that means you can redo it if you need to.

    You can also, in the dialogue, select alternate columns and skip the importation of them.

    Record the actions you take and you will have a raw VBA macro which you can tweak.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1