Excel functionality without Excel - windows

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.

Related

Telerik RadSpreadsheet to PDF

I’m currently using web forms and VB.NET I’ve tried following the examples and docs on Teleriks website, however the results are not as expected. It appears that Telerik is taking a screen capture and turning that into a PDF.
What I’m needing is to export the spreadsheet that is displayed in the RadSpreadsheet control into a PDF document such that the results are identical to what’s being displayed.
I’m starting to wonder if Telerik doesn’t actually do anything but take screen shots and save them as a PDF. Even their demo does that. Does anyone know how to go about exporting the Excel file into a PDF? Again their documentation to me isn’t really clear.
there are several libraries used to process documents. They are called Telerik Document Processing. You can use them to generate, modify or convert documents. You could use the RadSpreadProcessing library to export your grid data and then convert the Workbook to a PDF document. Here is the documentation of the PDF export feature https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/formats-and-conversion/pdf/pdfformatprovider
The PDF documents generated this way are not screenshot, they are real PDF documents.

Visial Studio - MS Teams - Auto Email Changes to Spreadsheet - Is this possible?

Visual Studio 2017
Microsoft Teams
Scenario:
Within Teams we have a team with a tab that contains a spreadsheet. Users can enter information w/ a new number and the name of the person responsible etc.
Is it possible that when this item is entered that an email can automatically be sent to the person responsible from within Teams?
I have done some initial research and so far I do see where you can create apps BUT I just would like to know if what I am proposing is possible and if so would it be a monumental undertaking or shouldn't be too difficult.
Any thoughts/feedback appreciated,
Thank you
There are actually two problems to solve here. One, how to detect that something happened in Excel. Two, to take action on that event and send email.
For both of these, you can create Excel macros using VBA (transforming the file from xlsx to xslm). XSLM files require the full Excel client though and don't run well on the web version of Excel. I can't think of another way to do it using Excel.

VSTO: Really password-protect & hide MS Excel Worksheets

Is it possible to do the following two things with VSTO VB:
HIDING SHEETS: Prevent users from un-hiding worksheets that they are not meant to. The xlVeryHidden works great but it's almost easily overridden by using another workbook and writing a simple VBA macro to loop through and unhide them all. What is the best way to combat hidden sheets not been shown unless done by the VSTO VB code?
PASSWORD PROTECTING SHEETS: What is the best way to password-protect Excel worksheets in a VSTO VB project? Does VSTO offer any better method than VBA; which is a simple password-protection where the password is saved in an easily accessible XML document? Essentially, I've locked the worksheets only allowing certain ranges to be edited by the end users and they shouldn't be able to edit them.
I am using Visual Studio 2012, working on a MS Office 2013 Excel Workbook at a document-level.
You can set the property Visible to XlSheetVisibility.xlSheetVeryHidden in order to hide the worksheet. Your probably could try to disable macro by via Application.AutomationSecurity property then set it to msoAutomationSecurityForceDisable to disable macro.
There's a nice and neat tutorial about how to programmatically hide Excel worksheet. Please don't forget to take a look at it.
You can set your password to password-protect worksheets via Workbook.SaveAs method. Also, if you'd like to check if workbook is password protected via Workbook.HasPassword property. Also you can find this tutorial about how to protect worksheets.

Choosing between Excel Add-In, Template and Workbook?

I'm looking for some high-level help with determining the best type of Visual Studio 2010 project to use for an Excel custom application.
I will be developing a program that requires the user to enter a dataset in a particular way. Not using a form per se, but rather in columns and the program will need to do some custom validation on the items in order to prep the data. From there, the user will be able to conduct various operations on the data via a custom Ribbon and associated options. The program will also transmit the data via web service.
I've fooled around with the Add-In project and that gives me a lot of what I need but I'm wondering if a Template or Workbook project is better for this in terms of data entry and being able to "guide" the user a little more.
How do you go about choosing between which project type to use? Do all the project types support a custom Ribbon?
Sorry if this is too far off topic. I'm referring to VBA, not Visual Studio, but it might still be relevant.
With an AddIn, compared to a Workbook, you can separate your code from the user's data. So, if the code is complex, and you'll need to update it separately from user's workbooks with data, this is not a bad idea.
With an AddIn, you can add buttons that do things like check to make sure the user data workbook is ok, or process it in someway. However, the AddIn custom buttons will load ever time a user opens any Excel worksheet. This doesn't sound good, but in practice, isn't so bad. You can code your AddIn so it does nothing as long as no one uses a button, so it almost doesn't hurt load times, etc...
A Workbook might be useful if you need to really guide the user - that is, you cannot rely on the user to hit a button to verify something, and instead you need to verify on every change, for example. However, the workbook solution incorporates the user data and your code in the same workbook, so if you need to update the code for existing users' data, that's harder.
I use a combination of AddIn (.xlam) with buttons, and a template (with minimal self-describing data only).
I'm not sure about the template-only option, so won't comment on that.

watin - saving a generated excel sheet

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

Resources