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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:57:45+00:00 2026-05-28T02:57:45+00:00

Checked out the link bellow and tried to use the method proposed there with

  • 0

Checked out the link bellow and tried to use the method proposed there with no results. My problem relates with importing from an Excel file using the OLEDB provider, for some reasons that I don’t understand, when the file is open in Excel the import shows some columns (e.g date) as text, it doesn’t happen when the file is not in use. My problem can be solved temporally by checking if the xls file is open/in use, so I can post a message asking the user to close the file.

Thanks,
Mihail

https://www.google.com/search?rlz=1C1RNHN_enUS465US465&ix=hea&sourceid=chrome&ie=UTF-8&q=stackoverflow.

  • 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-05-28T02:57:46+00:00Added an answer on May 28, 2026 at 2:57 am

    One way to do that would be opening the file in exclusive mode. This will fail if the file is open in any other process, and it will also prevent other processes from opening it until you close the handle. For example:

    File.Open("worksheet.xls", FileMode.Open, FileAccess.Read, FileShare.None); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Regarding the answer provided at this link: Proposed solution I tried to use this
I checked out a project from SVN and did not specify the project type,
I checked out a copy of a C++ application from SourceForge (HoboCopy, if you're
I checked out TripleDES. It's block size is of 64 bits. Is there any
I just checked out a revision from Subversion to a new folder. Opened the
I checked out this link: http://msdn.microsoft.com/en-us/library/ff769510(v=VS.92).aspx But when I run the default windows phone
I have checked-out a project from SourceForge named HadoopDB . It uses some class
Problem : I have multiple projects checked out in my depot. I also have
I checked out the example given on http://naghsheh.info/Pivot/Pivot.htm and tried to get it work
My q and a page sucks - it's this: http://rankingclimber.com/qa.php I checked out http://www.text-link-ads.com/r/faq

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.