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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:10:48+00:00 2026-05-17T16:10:48+00:00

I’m working with Microsft Office Interop API. My question pertains to Excel. I wrote

  • 0

I’m working with Microsft Office Interop API. My question pertains to Excel.

I wrote a program using Interop API to format Excel documents and then send them to the printer. The problem though is that we occasionally run across files in which people have created a column that spans 65,000+ rows, and all it contains is a formula. The formula only creates output for the first 100 or so rows, and then the remaining appear blank. But, when sent to the printer, it tries to print like 10,000 pages or something because of those formulas.

I first looked for ways to tell Excel to simply not print those ranges. I couldn’t find any setting to ignore those. Second, I thought about ways to do this programatically, but that logic would be pretty round-about and might cause issues with “regular” files that don’t contain formulas like this.

Does anyone know of a good way to have Excel ignore these formulas that equate to nothing?

I’m using Delphi and Office 2007 Interop API.

  • 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-17T16:10:49+00:00Added an answer on May 17, 2026 at 4:10 pm

    I don’t know Delphi, but I created a macro to get the last active column by using

    With ActiveSheet
        row = .Cells(.Rows.Count, "B").End(xlUp).row
    End With
    

    Then with having the row you could try to print the columns you need.

    ActiveSheet.Range("A1:" & "D" row).Select
    Selection.PrintOut Copies:=1, Collate:=True
    

    Hope that helps!

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

Sidebar

Related Questions

No related questions found

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.