Windows Service to back up Excel File into Database - c#

I have to backup excel file daily and i need that my excel file could automatically upload on SQL server at exact time which i want.
I am new to C# so dont know from where i can get proper help regarding this issue.I have searched in google but confused by many methods and complicated codes etc.
I am much desperate now so please help me out and send me links about this.

Write the windows service in C#.net to achieve this.
Details of Windows Service with sample:
http://www.codeproject.com/Articles/3990/Simple-Windows-Service-Sample

Related

How to pass data gathered in PHP to C#?

I've written a webpage (HTML & PHP) where a user can fill in various data into a form (using text-inputs and checkboxes). This data should be added to an already existing .docx template (MS Office Word).
Now I chose PHP because I thought PHPWord would offer the solution to all my needs... but it failed me, and I am not clever enough to adapt to the code make it work somehow. So I looked for another Library that could actually insert tables and images in .docx Templates and found DocX (http://docx.codeplex.com/). But this Library is design for .NET. Now I'm hoping DocX will offer the solution I need or my boss will hang me for wasting time.
So on to the question:
I somehow need to port the data gathered in the webpage from PHP to C#. But I'm not entirely sure how one should go about doing this...
I thought maybe I could transform the data into JSON or XML and somehow read that into my C# program. But I don't understand how to "pass on the data"... do I write to a file and read that file every 5 seconds? Do I create some kind of socket/listener on a certain port? Can I somehow trigger an event in C#? My programming knowlegde is lacking...
Could someone please push me in the right direction?

How do I edit a .PDF file while its a resource?

I've been looking around on the web for an answer to a perplexing problem. I'm trying to code a program in C# and I'm looking for a snippet of code that'll take any information a user would input, i.e using a textbox or a check box, and transfer said information onto a .PDF file that I've added as a resource.
Right now I'm using Visual Studio 2008 for my coding, any help would be appreciated.
You can use librairies to create PDF on the fly:
ITextSharp
PDF's are a proprietary format. PDF4Net is a pretty good library for merging information via XDF into PDF's, but you are going to have a lot of trouble trying to do this on your own natively.

How do I download google play install statistics to my database?

I want to find a way to automate the pull of total installs for each app my company has in Google Play. I want to bring this into our own interal database so we can marry it up with Google Analytics and in-app information we already have.
Can anyone provide the SDK or API I need to download and maybe some helpful hints to automtae this feed on a on-going basis.
Thanks,
I was looking into this and saw among others this question on my search.
The answer to this question states that you would need to scrape the answer.
Google Play Developer Statistics API
This states that you can manually download a csv file.
https://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=139628&topic=16285&ctx=topic
You could try to use selenium to automatically download the csv file and then read that in.
The answer on this page can also perhaps help you.
Is there an API to get sales report on Google Play?

Writing to an Excel file from SQL Server Database

Currently, I need to be able to retrieve values from an SQL Server DB, populate an Excel file according to a certain template, and then allow the user to download the file. I also need this this certain template to be customizable, in the sense that the user can add new fields, and remove fields.
I understand that there are a couple of approaches I can take: using .xlt, and using C# directly. With C#, the user will need to interact with a UI, which will then populate a ExcelTemplate table in the SQL Server. This ExcelTemplate table will then be used when the user wishes to download a new Excel file.
I know all this stuff may sound kinda abstract, so please do tell me if there are some places I need to elaborate/clarify. Thanks a bunch, man.
EDIT: Sorry, I kinda missed this part out, but I'd prefer to allow the user to customize these Excel templates via a Silverlight UI.
You can create Data Sources in Excel and pull the data from MS SQL Server.
You can use MS Reporting Services which allow to get reports in MS Excel format. In this case users can use Report Builder to customize the reports.
For pulling down data from SQL Server and dumping it into Excel, you can use Officewriter. It has Reporting Services integration and supports generating .xls and .xlsx documents. There's also a template component that basically does what you're trying to do. The templates are actually Excel documents, so the users can edit them directly in Excel. Not Silverlight, but not bad. You can try an eval for free.
DISCLAIMER: I'm one of the engineers who built the latest version.
at the end of the day I think I'm gonna spend some time building a customized dashboard. It won't be generic, but rather focused on the existing database.
I know this answer is kinda vague and all, but I'd like to say thanks for all the help :) it'd be great if there are dynamic solutions for this in the future! I think...

Call out to web service from Excel 2010

Starting an innovation week at work here. Good ol' Excel project! So here's what we want. We want to be able to create user defined functions in Excel, just like Excel has the SUM, etc. we want to make our own.
These UDF's would take Excel data in, and they would then pass that data to a Web Service which would do what it needs to do and then return the data back. I know how the Web Services will act, but what I need some guidance on is preparing the data in Excel, setting up the UDF's, and dealing with the sending/receiving of the data in Excel. I've never done any Excel programming before.
At first glance, it seems I might not need to do any VBA work, and that I could almost create a plugin for Excel (generate a .xll file from C#), and then go about it this way, but I'm not really sure how this all works.
Am I approaching this right? Are there any other things I should keep in mind? Is there anything I should read up on (any good links)?
Thanks.
There are good articles like below on MSDN.
Article 1
Article 2
Videos on Youtube and other
Video 1
Video 2
You can call a WCF service from Excel with VSTO or with VBA
You will want to use VSTO to create an add-on for Excel. Using Visual Studio create a new project. Select Office and then Excel 2007 Add-on or Excel 2010 Add-on. Check out this great resource for examples on how to get started http://www.packtpub.com/article/microsoft-office-excel-programming-using-vsto it pretty much has everything you are asking for (except calling a web service).
It may be possible to do all of this in VBA but it won't be as easy and you'll have to deal with the security issues that come with it.
You could take a look at XLLoop. This is a framework for developing Excel UDFs on a remote server. It has server implementations in a range of languages and is open source with a liberal license.
(Full disclosure: I work on this project).

Categories

Resources