AHSVGUY

I have searched and searched and searched about truncation of a large Excel Worksheet when inserted in to an application with "Insert Object". I found a technote, but it appears that the original problem has been resolved. However, I can't seem to make it work in my application nor a simple MFC application created with VisStudio 2005. I have also worked with Excel 2003 and 2007.

I take it that some applications have, by some method, managed to get the full worksheet embedded and/or linked into their app.

Is it possible How Documentation Code Snippit I would be so appreciative of any help at all as I am quite frustrated.

Best Regards,

AHSVGUY




Re: Visual Studio Tools for Office Excel Worksheet Truncation

Maarten van Stam

What is exactly the issue you are trying to solve What is your programming environment, language, targeted audience etc. etc.

What I read from your message is that you try to create an application that has an embedded Excel object stored and that you failed to use or save the contents

As you see I redirected your question with a lot of other questions. I asked these questions because the answer you seek is not as easy to answer as you would like to.

First let me say that this forum its first area of interest is the Visual Studio Tools for the Office System (VSTO), and that is most likely not the area you need, so you might be better served if you posted your question in a forum covering your preferred code language and area of the issue.

Second, try to rewrite your question with as much information as is needed to give you a good answer. What did you try to solve the issue, what have you already found but most important, what is it you want to do.

Third, if possible try to breakdown your issue in small details and try to solve each detail. Try to put each of these detailed questions into its own thread to get the right focus on your issue.

-= Maarten =-






Re: Visual Studio Tools for Office Excel Worksheet Truncation

AHSVGUY

Issue: Using Insert Object where the source is a large worksheet will not give me the full worksheet. It is truncated.

Programming environment: VC6 (current deployed application), and a simple MFC application that is a container, created with VisStudio 2005 C++ wizard.

Language: English

Targeted Audience: This is the only forum in the list that looked reasonable for this question, but please point me to the right one if this is not correct (as it would appear - apologies).

The problem I want to solve is to modify my application or even the simple MFC application I generated to be able to insert either a linked or embedded Excel worksheet where I get all of the filled columns and rows instead of them being truncated. That is, I want the containter in my application to have the ability to display the entire worksheet and not just the first x columns and first y columns.

I have an Excel worksheet that I have created with 54 columns and 500 rows. When this worksheet is inserted with Insert Object (OLE), I will get much less - like 17 columns and 67 rows. I have read all sorts of things about this, including the rect that is sent into the draw, but it doesn't seem to matter.

So, is it possible to bring in the entire worksheet and how would I do this

I hope I answered all of your questions, and thank you very much for the reply.

Best Regards,

AHSVGUY






Re: Visual Studio Tools for Office Excel Worksheet Truncation

Cindy Meister

AHSVGUY wrote:

Issue: Using Insert Object where the source is a large worksheet will not give me the full worksheet. It is truncated.

Programming environment: VC6 (current deployed application), and a simple MFC application that is a container, created with VisStudio 2005 C++ wizard.

Language: English

Targeted Audience: This is the only forum in the list that looked reasonable for this question, but please point me to the right one if this is not correct (as it would appear - apologies).

No, it's not the right place, but I understand your difficulty :-) The "Please Read First" message at the top of the forum gives you some links to newsgroups for Office-related questions. But finding help with C++ problems is a bit hit-and-miss if no one currently in a C++ newsgroup has the experience in a particular problem...

FWIW, the issue you describe is a known one. I've mostly dealt with it from the angle of inserting worksheet objects into Word documents. From the discussions I've had with MSFT folks (during betas, for example), I've gotten the impression that the target application (Word, for example) is responsible for what comes across. It determines, based on some kind of algorithm, how much of the worksheet can be displayed in the available room (a page) and crops accordingly. Word 6.0 was pretty good; the functionality hit the pits in Word 97 and only really recovered to a certain extent in Word 2003, where Word implements a "Zoom" when the data won't fit on a "page".

I also note that the problem tends not to occur when there's an OLE link back to the original data.

Unfortunately, I have no idea how to go about implementing this for any kind of application you may be working on.

AHSVGUY wrote:
The problem I want to solve is to modify my application or even the simple MFC application I generated to be able to insert either a linked or embedded Excel worksheet where I get all of the filled columns and rows instead of them being truncated. That is, I want the containter in my application to have the ability to display the entire worksheet and not just the first x columns and first y columns.

I have an Excel worksheet that I have created with 54 columns and 500 rows. When this worksheet is inserted with Insert Object (OLE), I will get much less - like 17 columns and 67 rows. I have read all sorts of things about this, including the rect that is sent into the draw, but it doesn't seem to matter.

So, is it possible to bring in the entire worksheet and how would I do this

I hope I answered all of your questions, and thank you very much for the reply.

Best Regards,

AHSVGUY






Re: Visual Studio Tools for Office Excel Worksheet Truncation

AHSVGUY

Thank you so much for the reply. It makes sense that there is some sort of algorithm going on in control of Excel from the behavior. You pass it a rect... At some point, it doesn't matter what size the rect is, that is all you are going to get from Excel.




Re: Visual Studio Tools for Office Excel Worksheet Truncation

Cindy Meister

<<makes sense that there is some sort of algorithm going on in control of Excel from the behavior. You pass it a rect... >>

How about if you change the Zoom of the worksheet you're bringing across, before putting it in the rect I think that's what Word 2003 is doing, somehow...