Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: split cells

by McDarren (Abbot)
on Feb 20, 2012 at 11:00 UTC ( #955043=note: print w/replies, xml ) Need Help??


in reply to split cells

Is there any way to split the data in the cells using perl?
Yes.

  1. Open the worksheet using your favourite Excel processing module
  2. Read the data from each cell
  3. split on whitespace
  4. Write the data back into the worksheet

Cheers,
Darren

Replies are listed 'Best First'.
Re^2: split cells
by bimleshsharma (Beadle) on Feb 20, 2012 at 11:35 UTC
    Yes, follow up below:
    * import module to parse xls. (This will help to modify your same cell of same file)
    * Read that cell text.
    * Split that cell text into newline. (@line=split '\n',cellvalue)
    * Split that line into tabspace (@innerline=split '\t',$line(index)
    * Now write each index position value of @innerline into different cells.
    Hope this will help.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://955043]
help
Chatterbox?
[marto]: configure whatever client you use to use a repositry you like?
[Corion]: usemodperl: Why would you want HTTP there? If you want/need to use wget without SSL libraries, set www.cpan.org (or whatever) as your uplink?
[marto]: I suspect more trolling...
[usemodperl]: Because the audience for my apps have old, locked down versions of perl that can't install modules or update perl and now all that is horribly broken without HTTP. Of course I can go outside Perl anytime but that impacts portability
[usemodperl]: I can find cpan mirrors on http but not with plain files, only tar.gz, does something like meta exist on http?
[marto]: run your own mirror minicpan
[marto]: or just fatpack/package your apps
[Corion]: usemodperl: No. I think your approach to "downloading modules" is horribly misguided. I recommend you use the standard tools, and/or move your own tools to standard interfaces. Or maybe just set up your own plaintext mirror if that's what you need.

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-06-24 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?