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

  • SEARCH
  • Home
  • 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 7815171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:26:06+00:00 2026-06-02T05:26:06+00:00

I have a large column of data in Excel that I’d like to read

  • 0

I have a large column of data in Excel that I’d like to read into a string cell array. However, some of the entries are numbers, and the rest are strings. So I have something like

288537
288537
312857
589889
589889
1019503
1019503
1098802
1098802
abc
efg
hij
1992724

The first row is a header row, so we ignore that. When I use

[~, ID] = xlsread('data.xlsx', 'A2:A125581')

ID contains only the string entries, not the numeric entries.

How can I get xlsread to treat the numbers as strings, so I can read everything as a string?

  • 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-02T05:26:08+00:00Added an answer on June 2, 2026 at 5:26 am

    XLSREAD returns three outputs. The third one is a cell array containing everything that has been read. However, the cell array has numbers where the data is numeric, so if you want everything as strings, you have to convert these:

    %# read everything into one cell array
    [~,~,raw] = xlsread('data.xlsx', 'A2:A125581');
    %# find numbers
    containsNumbers = cellfun(@isnumeric,raw);
    %# convert to string
    raw(containsNumbers) = cellfun(@num2str,raw(containsNumbers),'UniformOutput',false);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large data frame (named z ) that looks like this: RPos
I have a large column of data in Excel. This data should all be
I have some XML that stores column information and row data from a table
My overall problem is that I have a large Excel file(Column A-S, 85000 rows)
I have a fairly large Excel file. In this file there is a column
I have a set of data in Excel and in one column is a
I have a large data.DataTable and some formatting rules to apply. I'm sure this
I have lookup column, but the data in this column is very large.I want
I have a large CSV data file -- ~1,444,000 rows of data -- that
I have a large 2 column csv file (data.csv) with a weeks worth of

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.