watin - saving a generated excel sheet - watin

I have a Watin script that logs into a site and generates a report in excel format. I'm having a really hard time saving the generated excel file. I thought my answer was using the GetActiveObject method in interop services. I don't get an error using that, but it doesn't seem to find it either.
More info if it's any use: The original browser window remains in the background and the excel sheet generated has a name of "xxx.aspx". It's NOT in a browser window as it shows up as excel in the task bar.
Any help attaching to the new excel window would be greatly appreciated because I'd like to save it to disk.

WatiN only automates the browser so once the file is open in Excel WatiN is no longer helpful to you. You might want to ask this question without reference to WatiN since it is strictly a .NET/interop scenario. Here is a link that might be helpful to you: http://support.microsoft.com/kb/316126

Related

SSRS report - open hyperlinks in new tab

I have spent tons of time trying to figure out how to open hyperlinks from SSRS reports into new tabs without Javascript. I found rc:LinkTarget=_blank parameter that should fix the issue changing all "target=_top" to target="_blank". But it's not happening.
Thanks
Your link (I'm fairly sure) should look something like this
http://mySSRSServerName/ReportServer?/MyReportFolderName/MyReportName&rs:Command=Render&rc:LinkTarget=_blank

Excel-Addin with visible form

I have a query on the usage of windows form in excel add-in, application level.
Objective Statement:
Display customized windows form control, similar to a way a chart is being inserted into excel
Custom Pane
I have tried custom pane add-in but it seems to be on a entire workbook level, i need something on a worksheet level
Task Pane
I can't seem to use the task pane in application add-in for excel
Windows Form Control
When I click on a cell in excel i will lose focus to the windows form, i will need the windows to be together with the worksheet, but i can't use showdialog.
Thanks for the help in advance.
From your answer it is hard for me to figure out if you we are looking at a code solution here or something more high level, so I am going to assume that you are looking for a code solution, please correct me if I am wrong.
Have you considered using an OLE object or ActiveX?
There is an example from Microsoft here, how to develop an ActiveX control. (Here is some other walkthrough that I found helpful).
Just to give you a hint how it (the example mentioned above) looks like, here is the screenshot of the compiled example that I added onto the excel sheet:
ActiveX control can be added both manually, or by code, so I could imagine that you could also provide a COM Excel Add-in that would add some buttons onto the ribbon, that when pressed, would add the desired controls onto the sheet.

Ribbon customization, always have access to a sheet

Hello competent people out there!
I have made a time registration sheet, that I use at my work place, in which I type in the hours that I am working on which assignment etc. Every time I need to use this sheet I find its physical location on the hard drive and open it. Through all day this sheet is open because I continuously has to registrate what I do. I want to get rid of this process.
My question now is: is there a good way to "put" this sheet up into the ribbon, so that I can access it from any excel workbook that I am working in? My first thought has been to add a button that simply opens up the workbook, but that wasn't exactly what I was looking for. I want to integrate this "time registration" into Excel itself.
Any input will be helpful.
Thank you very much!

Save webpage displayed in webbrowser control

It is possible to save the content displayed on a webbrowser control in a Windows application, giving that there's no access to the source code? The webpage is downloaded in a proprietary format from a HTTP server, so sniffing the HTTP traffic doesn't help too much (it's a base64-encoded data which decoded gives a binary file without any recogniseable headers).
I think a good solution will be to load the application in Wine, giving the open-source nature of it, and trying to extract the data somehow from the Gecko HTML viewer, but I don't have any idea how to start...
Any better solutions than recompiling Wine to display the content of displaying webpages? I hope for some magic tool to display HTML source from a webbrowser control, but any starting point will be appreciated.
Thank you.
Ok, I successfully did this with AutoIt, with just three lines of code. Just attach to the IE Control and call IEPropertyGet on it. Sample code:
#include <IE.au3>
$oIE = _IEAttach("window_title", "embedded");
ConsoleWrite(_IEPropertyGet($oIE, "outerhtml"));
Now in AutoIt's console will appear the source code of the displayed page in embedded webbrowser control.

Excel functionality without Excel

Currently we have a system which we paid for that pushes information into Excel through a plugin and only into Excel. This is the way the product was designed. In a spreadsheet you enter a command which then pulls the appropriate data.
I wrote a few lines of code to save the data from excel into a SQL database and then push this information onto a webpage so it can be easily viewed.
The problem with this is that it requires Excel to be open 24/7. Every so often Excel will hiccup causing information to stop updating. This is easily fixed by restarting the Excel spreadsheet, but is tedious.
My question: is there any API which allows me to mimic Excel without having Excel open?
Are you looking for a spreadsheet component that can be embedded in an application. You can find a list here:
http://www.devdirect.com/all/SPREADSHEET_PCAT_1977.aspx
After some research on this it has become clear to me that there is no Excel API from Microsoft to allow access to Excel without excel.

Resources