Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8360627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:30:55+00:00 2026-06-09T11:30:55+00:00

I recently imported a number of large excel 2010 spreadsheets (which was exported to

  • 0

I recently imported a number of large excel 2010 spreadsheets (which was exported to CSV for the import) into a database. I have now been told that the cell comments are missing (I didn’t even know there were cell comments in the original Excel file, I only ever had the CSV).

I need to search each row of the Excel file, find cells with cell comments, grab the comment and add it into the database for that row (the database references the row number from the spreadsheet, so if I can just extract row number and all the cell comments in that row, that’s perfect)

My skills are in PHP and Perl. Ideally I would use PHP to read and process the data, but using something else to output text/csv, which I can then parse with PHP would work fine too.

Does anyone know a way to extract these cell comments, or have any pointers?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:30:56+00:00Added an answer on June 9, 2026 at 11:30 am

    Use the PHPExcel library. Comments are held against the worksheet. and the worksheet’s getComments() method will return an array of comment objects indexed by their cell address.

    EDIT

    include '/PHPExcel_Library/Classes/PHPExcel.php';
    
    $inputFileType = 'Excel5';
    $inputFileName = 'CS2template_all_products_v12.xls';
    
    $objPHPExcelReader = PHPExcel_IOFactory::createReader($inputFileType);
    $objPHPExcel = $objPHPExcelReader->load($inputFileName);
    
    $sheet = $objPHPExcel->getActiveSheet();
    
    $comments = $sheet->getComments();
    foreach($comments  as $cellID => $comment) {
        echo $cellID,PHP_EOL;
        var_dump($comment->getText()->getPlainText());
    }
    

    Note, my example uses an Excel .xls file, but the method will work just as easily replacing the $inputFileType with “Excel2007” for an .xlsx file

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently imported a large number of source files into an eclipse project. Unfortunately
Recently I have released my app into the US AppStore. Now I Planed for
I recently back up my local Postgresql database and imported(restored) into Heroku's SHARED_DATABASE. heroku
I have a stack of code snippets imported into Visual Studio. Just recently, they
Recently we started working with Database project in Visual Studio 2010. I have added
I have a Cocoa project that I recently imported into Xcode 4. I notice
I'm trying to clean a recently imported sql server 2008 database that have to
I just recently implemented: https://github.com/gpambrozio/BlockAlertsAnd-ActionSheets I have imported all the necessary files into my
I recently imported quite a few posts (many thousands) into WordPress and found out
While recently imported a new project into eclipse, at one point when I tried

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.