Notifications
Clear all

[Closed] "Excel Spreadsheet in Rollout as Extended Viewport" Problem

Hey all

Really appreciate any help anyone can give on this subject…

I’ve been trying to get an excel sheet to show in a rollout, but even simply copying and pasting from maxscript reference causes issues.

It’s the code from “Excel Spreasheet in Internet Browser Control as Extended Viewport”.

The problem i have is that the spreadsheet isn’t immediately visible in the rollout. It’s there, but that part of the screen hasn’t redrawn or refreshed and just shows the rollout background.

If I click in that blank area where i know cells should be, the cells appear. likewise with the rest of the activex control, such as the formula bar etc.

I’ve just tried to take a screenshot but when I paste that into photoshop it actually shows the excel contents fine. So that confirms to me that it’s a redraw issue of some sort.

Now to guess at what the problem(s) might be

  • I’m on xp64 (although except for this issue, i’ve never had any issues at all, no driver problems or anything. I have read in many places that people have had probs in the past, so maybe this is a similar problem?)

  • I’m on Max 9 64 (could the code in the max reference be slightly out of date?)

Other than that I can’t think of why it’s going wrong and not redrawing the floater. If I was to add code to close and open the rollout after all the rest of the script has executed, I think that might help. But it’s an ugly solution and I’m sure there’s something else I must be missing

Again, any suggestions are appreciated

Ian

5 Replies

Without looking into the code, I would say it sounds like it’s that you are using Max9 and XP64.

There is a thread talking about these issues here:

http://forums.cgsociety.org/showthread.php?f=98&t=448733

Read through it, as my fisrt gut reaction is that that’s the problem.

-Dave

In fact, you should not be able to use ActiveX controls under 3ds Max 9 64. It’s not recommended to use ActiveX controls in script coded for 3ds Max 9.
I think it would possible to open an Excel spreadsheet in a dotNetControl.

Ok thanks for that link. I think you’re right – I’m going to ditch the activex method and give dotnet a go. From what Bobo’s saying about it I should rewrite my activex functions to dotnet anyway.

It’s a shame microsoft didn’t or hasn’t recompiled all activex controls for 64 bit windows. They must have had their reasons for doing so, oh well.

Thanks again for pointing me in the right direction

Ian

edit: thanks for your input on this as well, yannick

Here is how to embend an Excel spreadsheet in a rollout using a dotNetControl :

(
	rollout dotNetExcelSpreadsheet "Excel Spreadsheet" width:600 height:400
	(
		dotNetControl dotNetWebBrowser "System.Windows.Forms.WebBrowser" pos:[20,20] width:560 height:360
		
		on dotNetExcelSpreadsheet open do
		(
			-- Load the Excel spreadsheet
			dotNetWebBrowser.Navigate "C:\\Test.xls"
		)
		
		on dotNetWebBrowser Paint do
		(
			-- Needed in order to force browser refresh
			-- Otherwise the control isn't well displayed
			dotNetWebBrowser.Refresh()
		)
	)
	
	createdialog dotNetExcelSpreadsheet
)

wow! great stuff! I wasn’t expecting to be spoonfed how to do it – that’s made my life so much easier, and also now I have a really good starting point to get my head round dotnet and max integration.

again, many thanks

Ian