Parsing Data From a File on the server - c#

I have an application on a server and I want it to send a file that can be parsed for the data I am looking for with as little human error as possible.
I am not sure what tags to attach to this it is being coded in C# though.
I was thinking an excel spreadsheet but it can be changed to easily from what I'm told.
What is a vaible way to recieve data to be parsed that can have any format?
Or
What is a way to enter data to get to the network without setting up a program?
Edit:
The server is on a diffrent network than the user wich they cannot directly access.

InfoPath is made for user form data like that.
Excel is another option, but you're right - its difficult to validate user input.
Google Spreadsheet's Forms feature is a nice alternative but getting the data from the spreadsheet afterward could be a pain.

Related

How to update data in excel File using C#?

This Question might be repeated, But I couldn't get solution regarding my problem so far. I'm new to Interop. I'm using excel file (as a database).
Here is data presentation in excel file
in my data If Card ID repeated then I need to increment '1' in Counter in the same row, similarly I need to fetch IP address of same row..
I'm using Interop Excel approach to insert data in excel file..
Kindly tell me how can I perform that update operation to that excel file through C# (WPF)
Sorry for bad English..
Thanks
I recommend using Closed XML
You write to the file directly and don't need Excel. It will need to be the latest version of an Excel file to work (The open xml standard).
Epplus.dll or npoi.dll will also read/write to excel files w/o excel.
Save the data in an XML or JSON file, then when you want to visualize them you create the excel file from these data, so you will have a very light file and easy to read and update if you wish.
I haven't done this specifically through wpf, but you can access powershell cmdlets through .net and powershell has commands for retrieving and writing Excel data.
That said, my experience has been it's very tedious and inconsistent with bugs. I would tell your client that using an Excel file as a database is impossible and certainly prone to failure in practice.
For one thing you will run into read/write restrictions if it is used by anything else.
If you don't mind to use comercial libraries, you can try to use Aspose.Cells. It has rich cells API and able to work without Excel interop API.

Fill and Print Template C#

I am developing an application using C# which is simply the user inputs data, it is saved in a db (which is not SQL Server but MySql) and then prints it.
At this stage the user gave me a template which has the logo and some company information on top, in the middle the lines i need to fill and on the bottom some other information regarding this company.
Is it possible to open this document fill the required lines and print it using c#?
Sorry i cannot provide anything but i am stuck here and can't seem to figure out from where to start?
Thanks & Regards
Do you have access to any kind of reporting ie.Crystal Reports or SQL Server Reporting Services. You have one of 2 options, either you need to write a report that mimics his template using one of the technologies above, or you would need to use interops to access MSWord or MSExcel and do it that way. You may be able to use some third party PDF software.
If this was my project I would go the report route.

how to store adobe page maker data in database?

One of the educational data was stored in adobe page maker file (.PMD) file. Which consist of scientific formulas like mathematical equations, chemistry formulas, I would like to store those data on a MSSQL database then represent in browser. I tried to read PMD file data using C#.NET unfortunately I didn’t get the results which I required.
Can anybody help me regarding this?
Is there any possible ways to read page maker data instead of C#.NET?
Is there any chance of getting the result if we convert the PMD file to another extension?
Sorry, I am not familiar with PageMaker, so just speculating.
You can try to convert to Indesign file:
https://helpx.adobe.com/creative-suite/kb/open-pagemaker-files-indesign.html
Indesign has XML export and script support.

csv file upload on asp.net

User need to upload 30,000 csv values, these values may contain 16 digit numbers or zipcodes.
Now our asp.net project doesn't use AJAX tool kit controls or jquery or any other 3rd party controls or open source code. This is restriction as per companies privacy policy.
So I have to come with a best way to accommodate file upload feature. This has to be versatile in regards to re-usability some thing like a custom control
This file upload feature should not be saved on the server, instead I need to read data into stream buffer and send them to UI then once user verify these values he/she'll have to hit submit thus values will be saved to DB.
what are the best ways to implement this,
Can I make use of System.Net.Webclient? or
Is there any other alternative ways by using Async HttpHandlers?
Can I show file upload progress to UI ?
Appreciate if you could help me with proper guidence on this.
Thanks in advance
krish
Well 30,000 values of zipcode or any other 16 digit code should be uploadable normally using file control(i mean via postback).
if you have to read and show 30,000 on the UI, i presume you are at risk of freezing your UI.
Moreover if you are not on HTML5, there is no way that you can read the content on the client side, except if you fiddle around with flash.
HTML 5 file api reference
http://www.html5rocks.com/en/tutorials/file/filesystem/
How to read and write files with Flash(Action script)
http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-in-flash-player-10/

How to print text field data in report format?

I am developing a simple application using win forms C# in which simple text fields receive data from the user.
Now i want to print that fields data in report format keeping in mind i am not using any database.
How can i do that? if it's too simple then i am sorry, i am just a beginner.
You can use Microsoft Reports. Data source doesn't have to be database, you can use object from your solution.
Useful links:
Object data source
General info

Categories