devxlogo

Ask the Doc Detective: Downloading Excel Spreadsheets, Automation Windows Forms Testing, and More

Ask the Doc Detective: Downloading Excel Spreadsheets, Automation Windows Forms Testing, and More

inding what you need in the Microsoft? Visual Studio? .NET documentation, which has over 45,000 topics, can be a daunting task. The Doc Detective is here to help, utilizing his investigative skills to probe the depths of the documentation.

Can’t find what you’re looking for? Just ask?if it’s in there, I’ll find it for you; if it isn’t, I’ll let you know that as well (and tell you where else you might go to find it).

Have a question for the Doc? Send your questions for future columns to me at [email protected].

Dear Doc Detective,

I am building a Web application in Visual Studio .Net C# which needs to download Excel spreadsheets from various government Web sites. Not sure how to do this?any help would be appreciated.

– Wondering in Washington

Dear Wondering,

Hmm…. downloading information from government Web sites?you aren’t a spy, are you? Nevertheless, the Doc searched the Visual Studio docs and the MSDN library and couldn’t find anything related to Excel and ASP .NET.

I did, however, find an article in the Knowledge Base that should give you what you want?it’s called “HOW TO: Query and Display Excel Data by Using ASP.NET, ADO.NET, and Visual C# .NET,” the article number is 306572.

If you prefer to program in Visual Basic, there is also a Knowledge Base for you: “How To Query and Display Excel Data by Using ASP.NET, ADO.NET, and Visual Basic .NET,” article number 311731.

– Doc D


Dear Doc Detective,

I am working on automation for testing a Windows Forms application, and I need to find a way to get a specific ID for each control at run time. I tried using SpyXX.exe, but it seems that the ControlID is being set to the Handle (HWND) of the control, which changes each time the application runs.

Surely there must be a way to target a specific control?

– Testy in Tehachapi

Dear Testy,

First of all, my name’s not “Surely!” Seriously though, there isn’t a lot of documentation devoted to software testing and automation.

According to one of the Doc’s buddies on our test team, there is a Windows message (WM_GETCONTROLNAME) that you can query to find a specific control. The article “Automating Windows Forms” goes into detail on how WM_GETCONTROLNAME is used.

Shirley [sic] that will be of some help!

– Doctor D


Dear Doc Detective,

My company has a lot of COM components written in Visual Basic 6. We’re not ready to rewrite them in .NET since we still have VB6 applications that use them as well. I’ve read up on COM interop and understand how to use the COM components from my Visual Basic .NET application, but how the heck do I deploy an application that uses them without going to each desk and manually registering the components?

?Stuck in Stuckeyville

Dear Stuck,

The deployment tools in Visual Studio .NET do indeed support registering COM components, but it’s apparently a secret. The only topics I found relating to this are in the .NET Framework documentation; they have nothing to do with Visual Studio .NET deployment.

Fortunately though, there is a whitepaper in the MSDN Library that shows how to deploy Visual Basic .NET applications that use COM components; as a bonus it also shows how to deploy Visual Basic 6 applications that use .NET components. Just look for “Deploying Hybrid Visual Basic 6.0 / Visual Basic .NET Applications.”

Read up, then go forth and deploy?after all, ’tis better to deploy than to receive.

– the Doc


Dear Doc Detective,

I have recently installed Visual Studio 2003 on my Windows Server 2003 computer. When I try to create a Web project, I get a cryptic error message. Can you help me?

?Webless in Weehawken

Dear Webless,

There are a number of reasons why Visual Studio could fail to create Web projects. The most common reason for your issue is that you don’t have IIS enabled, or it isn’t configured properly for ASP .NET.

There is an MSDN article explains the requirements and provides step-by-step instructions for configuring IIS on various operating systems. Look for “Visual Studio .NET Software Requirements” in the MSDN Library.

?Doc Detective

Doc’s Doc Tip(s) of the Day
If you press F1 to get Help, the Help topic shows up in the IDE in a docked window. To make it easier to read Help while working, you can undock the window in various ways. One is to right-click the tab for the Help topic and then choose Floating. You might also find it useful to open Help as a separate application. From the Start menu, choose Programs, choose Microsoft Visual Studio.Net, then choose Microsoft Visual Studio.Net Documentation. (Make yourself a shortcut if you do this often.) That way, you can use Alt+Tab to switch between the IDE and Help.

Do you avoid Dynamic Help because you don’t like what it shows? No problem?you can customize it. From the Tools menu, choose Options, choose Environment, and then choose Dynamic Help. There you can select the number and types of topics that appear. If you need information on your choices there … click Help!

Found a topic in Help that doesn’t help? Tell the Visual Studio documentation team about it at [email protected].


URLs

http://support.microsoft.com/default.aspx?scid=kb;en-us;306572

http://support.microsoft.com/default.aspx?scid=kb;EN-US;311731

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbcondeployinghybridvisualbasic60visualbasicnetapplications.asp

http://msdn.microsoft.com/library/?url=/library/en-us/vsintro7/html/vxtbsVisualStudioNETSoftwareRequirements.asp?frame=true

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist