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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:51:56+00:00 2026-05-20T13:51:56+00:00

I have been struggling to assign an attribute to an object (or is it

  • 0

I have been struggling to assign an attribute to an object (or is it an instance)

xl=win32com.client.Dispatch('Excel.Application')
xl.Visible=0
srce=xl.Workbooks.Open('myexcelfile')
srce.CheckCompatibility='False'

If I query the srce object about its CheckCompatibility attribute I get a response of ‘False’

>>> srce.CheckCompatibility
    False

So I am naively thinking I can save this anyway I want

srce.SaveAs(r’c:\newtttxt14.xls’,FileFormat=1)

But when I do that the Compatibility Checker dialog comes up. I hit continue, the file saves and I then check the compatibility again.

>>> srce.CheckCompatibility
    True

So I again try to set it and this time I am successful

srce.CheckCompatibility='False'

I query it once more:

>>> srce.CheckCompatibility
False

Now when I try to save the file the Compatibility Checker Dialog does not appear, the file saves exactly was I want it to.

I need some certainty about being able to set the attribute of srce before I attempt to save the file in another format – can this happen in some other way?

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-05-20T13:51:57+00:00Added an answer on May 20, 2026 at 1:51 pm

    I’m not sure, but I suspect what’s happening is that saving the file in XLS form is resetting the value of CheckCompatibility since the default value of that property is True for Excel 97-2003 binary workbooks.

    In any case, there are multiple reasons why Excel might display a dialog when saving a file, not just the compatibility checker. I suspect what you really want is to suppress dialog boxes so that no user interactivity is required when your script saves a file. You can suppress dialog boxes by adding:

    >>> xl.DisplayAlerts = False
    

    before your call to srce.SaveAs(...).

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

Sidebar

Related Questions

I have been struggling to get an web application to run in the root
I have been struggling with the following problem: I have a value object containing
I have been struggling to think of some decent uses for things like vectors
I have been struggling with this question for awhile now, and I haven't reached
I have been struggling with this for quite some time having been accustomed to
I have been struggling to find an answer to this theoretical question, even tho
I have been struggling with this for months in my project. Here's the deal:
I have been struggling with this yesterday whole day, and still couldnt figure it
I have been struggling with my customization of EditorForModel and the naming of HTML
I have been struggling with the unholy alliance that is WebSphere 7+ and Mojarra

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.