Hello rockyurock

Update: After experimenting with the Spreadsheet::ParseExcel::SaveParser I noticed that it can not process xlsx file formats only xls file formats. Which in your case is not what you are looking for.

So I checked again online and I found Excel::Writer::XLSX. The problem with this module is that only produces new xlsx files it can not read and process new same file. Taken from documentation:

Excel::Writer::XLSX - Create a new file in the Excel 2007+ XLSX format +.

So I tested it with the following example code:

#!/usr/bin/perl use strict; use warnings; use Excel::Writer::XLSX; # Create a new workbook called simple.xls and add a worksheet my $workbook = Excel::Writer::XLSX->new( 'a_simple.xlsx' ); my $worksheet = $workbook->add_worksheet(); # The general syntax is write($row, $column, $token). Note that row an +d # column are zero indexed # # Write some text $worksheet->write( 0, 0, "Hi Excel!" ); # Write some numbers $worksheet->write( 2, 0, 3 ); # Writes 3 $worksheet->write( 3, 0, 3.00000 ); # Writes 3 $worksheet->write( 4, 0, 3.00001 ); # Writes 3.00001 $worksheet->write( 5, 0, 3.14159 ); # TeX revision no.? # Write some formulas $worksheet->write( 7, 0, '=A3 + A6' ); $worksheet->write( 8, 0, '=IF(A5>3,"Yes", "No")' ); # Write a hyperlink my $hyperlink_format = $workbook->add_format( color => 'blue', underline => 1, ); $worksheet->write( 10, 0, 'http://www.perl.com/', $hyperlink_format );

On my linux operating system worked perfect produced the a_simple.xlsx and openoffice was able to open the file and read it without any problems. I do not have a Windows OS to test it but by 99.9% it will work just fine.

So my proposed solution is to use your script that reads and parses your data and then create a new update xlsx sheet with the module.

End of Update

I think you are looking for this (Spreadsheet::ParseExcel::SaveParser). Taken from the documentation of the module:

Spreadsheet::ParseExcel::SaveParser - Rewrite an existing Excel file.

The module that you are using can only read the excel file. Taken from (Spreadsheet::Read):

Spreadsheet::Read - Read the data from a spreadsheet
Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: How to read the value of a variable (read from a Excel file converted Into text file) and put then back into Excel column by thanos1983
in thread How to read the value of a variable (read from a Excel file converted Into text file) and put then back into Excel column by rockyurock

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.