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 8458551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:06:38+00:00 2026-06-10T13:06:38+00:00

UPDATE 2 string connectionString = String.Format(@Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=Excel 8.0;HDR=YES;IMEX=1;, EXCELFILENAME); string testCaseName = test_case_2;

  • 0

UPDATE 2

string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""", EXCELFILENAME);

            string testCaseName = "test_case_2";

            string query = String.Format("SELECT * from [{0}$] WHERE columns={1}", workbookName, testCaseName);

            OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, connectionString);

            DataSet dataSet = new DataSet();
            dataAdapter.Fill(dataSet); //<<ERROR 

        DataTable myTable = dataSet.Tables[0]; 

ERROR:
No value given for one or more required parameters.

UPDATE END

UPDATE:

string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""", EXCELFILENAME);
            string query = String.Format("select * from [{0}$]", workbookName);

            OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, connectionString);               
            DataSet dataSet = new DataSet();
            dataAdapter.Fill(dataSet);

            DataTable myTable = dataSet.Tables[0];

How to read data from cells and store it in array/string. I have done reading worksheet but can’t find any better of doing

so here is my excel sheet looks like:

enter image description here

I should be able to pass the column in my case test_case_1 or test_case_2 etc… and read the columns for that particular row….

  • 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-10T13:06:40+00:00Added an answer on June 10, 2026 at 1:06 pm

    Regarding filtering.

    As you are using OleDb for your data retrieval, nothing prevents you from using more advanced SQL:

    string testCaseName = "Test_case_1
    string query = String.Format("SELECT * from [{0}$] WHERE columns=\"{1}\"", workbookName, testCaseName);
    

    You can use the names of the columns for filtering. In your case the filter is on the columns field. (btw. it is a confusing name)

    As far as I remember the header of the table must be in the first row, you may need to move your table one row up.

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

Sidebar

Related Questions

I am trying to UPDATE a mysql TEXT data-type column with a string contains
I have the following function: private void populate() { String connectionString = Properties.Settings.Default.Database; String
string selectSql = update + table + set state_ + mode + _id=1 WHERE
String sql = update `library`.`memebers` set 'STATUS'=' + 1 +' where mem_id = '+str+';
I am trying to update a field's value if a string column is between
For example var string = 'width=300 height=650' i would like to update height in
I'd like to update all records with an empty string in all columns of
I try to update database table and this is my code: public void updatefiletable(String
I need to update time info in a DateTime. I get a string in
I have a string dependency property (SearchText), when updated, needs to update a collection

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.