I'm looking for a way to store data generated by an excel template somewhere on SharePoint 2010. I am very new to SharePoint and still learning some of the abilities etc.
The goal is to store the data created by an excel template when a staff creates a quote using the template. I want to have the quotes available for historic purposes and compare the data.
I understand that SharePoint may not be the correct solution and that there exist much better platforms but right now I'm stuck with SharePoint. Any advice would be appreciated.
I found the answer to this. SharePoint has a number of webservices that can be used. After doing a heap of searching I found that using the Visual Studio Professional a Excel Workbook Project can be setup with embedded Visual C# code. I am currently implementing this.
Related
Background and Problem
I lead a team of tech writers. Our team has a Word template (.dotm file) that has a bunch of VBA macros we've created over the years to help us automate tasks in Word. The macros are obviously stored inside of a .dotm template. Given that the code is stored in a binary file, the code is not easily traceable across commits.
Currently, we have to pull the changes on the branch and then open the macro inside Word's embedded code editor from the .dotm. But there's no way to see what exact code changes someone else made line by line or resolve conflicts using something like Beyond Compare.
What I Need
I'd like to find a way to automatically expose the VBA code from the .dotm as some kind of text file so that we can:
Do Word VBA coding tasks within VSC
Easily track and review each others code changes at the line level using our git repository
Resolve merge conflicts more easily
Has anyone found a way to do this?
What I've tried
I've tried searching online and on stackoverflow.
Hoping it might help, I installed ScriptLab, and I after following the MS tutorial, I now have Office Add-Ons working with VSC.
(https://code.visualstudio.com/docs/other/office),
(https://learn.microsoft.com/en-us/office/dev/add-ins/tutorials/word-tutorial) While the Office Add-Ons through VSC does provide an alternate (more modern) way of automating using Javascript, and the .js files are commit-able, it's not providing a way to expose the Word VBA, at least not that I could see.
Thank you in advance!
ScriptLab add-on is for playing with JavaScript code instantly, not designed as a macro infrastructure in Office.
Sounds like you need to switch your VBA macros to COM add-ins rails. There is no converters that can do this part of work for you automatically.
You may consider creating a VB.NET based add-in. In that case you will avoid language translating issues. You may find the Converting Code from VBA to Visual Basic .NET article helpful. It presents issues to consider when converting your Microsoft Office solutions from Visual Basic for Applications (VBA) to Visual Basic .NET. Provides a general overview of their differences, and then uses examples from Word and Excel to describe how you can use Visual Studio Tools for the Microsoft Office System to convert your code.
I'm making a program that will eventually be used as a simple program to keep track of customers at a campground. I had originally made an excel spreadsheet for the owner where they could add how much each renter paid per month and I set it up in a way that it totaled each month and the whole year for him and displayed it like an accounting spreadsheet, with double underlines and the like. Now, he no longer has a copy of excel. I have set him up temporarily on google docs, but besides it not having all the functionality of excel, he doesn't trust it on the internet and has a hard time navigating to it.
What I'd like to do is create a program that would use forms to let him easily enter information, but display it either in the excel spreadsheet like he's used to seeing, or something that looks and prints pretty much the same.
I've seen people use SQL to work with access and excel. I'd like the connection string for that if anyone knows it. I have Visual Studio 2013 and I have Excel 2010 at home and work and 2013 at work.
My big question for you guys, that I can't find any information on is whether or not excel will work if I install the program on his computer that doesn't have excel installed? Does it work because it's part of the program? Can I only use the sheets and formulas that I set up when I created it? Can I generate new sheets using the program once it's installed on a pc that doesn't have excel installed on it? Thanks a lot for the help guys. I can't find information on this anywhere.
It depends what library you use. If you use Microsoft.Office.Interop.Excel than you will need to have the specific version of excel installed or at least a version that supports your interop assembly (my past experience was that it had to be exact).
The other option is to use another standalone third party library that reads the zipped XML files (.xlsx) and can manipulate it through that. Some libraries worth mention:
NPOI
EPPlus
ExcelLibrary
I know there are heaps and heaps of threads out there on recommending and using OpenXML to manipulate a Word 2007 (docx) document.
But none I could find, have a practical example (full solution in zip) that I am able to try out and demonstrate to learn quickly how to use OpenXML.
What I am after is a way to open a Word 2007 document template with several mailmerge fields, populate those fields from a dataset (SQL Server 2005) and save the template as a Word document ready to email.
UPDATE: We are using Visual Studio 2005 with .Net 2. Is that going to be a problem? Could we have .Net 3 installed but still use VS2005? Porting to VS2010 is in the cards for us, but not right now. We need a solution to this problem before we go upgrading to 2010.
And please do not recommend 3rd party products as we have to look for a free workable solution.
Much appreciate your time. Thanks
Here's an example.
It uses docx4j.NET - which is open source and which you can get from Nuget - not Microsoft's Open XML SDK.
I have a general question and I'm not sure where to begin, literally. Can you please leave any direction at a fairly high level so I have the chance to try to figure it out for myself? Here's my initial plan, but here's the issue! I don't know where to start. Where would I begin with this? Would it be an Excel module? I need some direction guys!! Let me give you a quick run down of what we're trying to accomplish.
We start out with 2-3 customer specific spreadsheets with an account number + [static] file name.xlsx and about 7 generic template excel files where we use the data from the customer specific spreadsheets and save a copy of each of the template files in the customers store folder.
What I'm trying to figure out if VBA is the direction that I need to be going with this or if there is another method that would accomplish the same goal or be more efficient at getting it done. My thinking at this point is open one of the customers files, save the active workbook file path as a string (this would contain the file directory, division, customer number and customer name), split the string of the file path and save the information that I need as variables, open the appropriate template files based on division number, probably run a couple recorded macros then re-save the files using the account number in the appropriate directory. If there's anything else I left out for this to make more sense, please let me know and I'll re-edit the post. Thank you in advance for any guidance!!
I don't think you should use Access or VSTO - I'll explain why, then offer a practical way forward.
Access is way over the top for what you want to do: most people find it much easier to write code in Excel VBA (I speak as a trainer with 20 years of experience, who is a guru on both packages).
Visual Studio Tools for Office was Microsoft's attempt to get the business world to stop using VBA in Excel, and use the much more robust VSTO within Visual Studio. It's a great idea, but unfortunately not many people seem to be adopting it. In computing it's rarely a good idea not to go with the flow (and anyway, the learning curve for VBA is shorter than that for VSTO, IMHO - hope that's enough acronyms in one sentence!).
As to the practical solution: I've just finished writing a fairly large online tutorial in Excel VBA, which is at exactly the level you need, I think.
Good luck!
Since you are dealing with XLSX files then you are in Office 2007 or 2010, so you could use Visual Studio Tools for Office. This will allow you to use the .Net framework and C# or VB.Net in Visual Studio to get a better development experience than VBA. You could add your own ribbon and buttons to Excel to help accomplish your tasks.
I am now engaging in an excel vba project. It's a excel front interface for the workers in a site with an Access database in the company network. I dont like much the VBE in Excel 2007, so im wandering if I can do this with VB.NET, which seems to be a more adorable IDE. And where can I find some resources on this? Or recommanded books? Thanks!
Im using Excel 2007 et VB.NET 2008
You could also try Excel-DNA (free). There are many other products out there too. You can make it work with VB.Net Express also, you just need to add a reference to your excel SDK. Also, Add-in Express looks pretty nice. I've never tried it though (costs money).
I think you are looking for Visual Studio Tools for Office: VSTO.
This allows you to develop using VB.NET (or indeed C#) but with full access to the Office automation facilities.