Hi There,
I have some serious issue - I have a .Net application that is generating various reports in CSV format and then fires up excel from code to view this file.
The file is viewed properly and everything is alright (I make some calls from within my code to the Excel Interop)
I Couldn't find any call that will allow me to set records from "General" format to "Text" format....
User Profile
Collapse
-
Solution has been found :
ProcessStartInf o X = new ProcessStartInf o("C:\\c.xyz" ); //or any other file name.
X.ErrorDialog = true;
X.UseShellExecu te = true;
Process.Start(X );
as simple as that :-) -
Can Process.Start() call the "open with" dialog ?
Hi There ,
Is there a way the Process.Start() method will open the "open with" dialog if a file association is not available ? if not , is there any equivalent ?
Thanks in advance. -
Checking if a using directive is not available
Hi There ,
I have an application that uses excel COM interop. (Microsoft.Offi ce.Interop.Exce l)
However , If i distribute my app to computers that for eg. do not have excel ,
The application will crash.
Is there a way to make my app behave in a certain way if a used "using" directve is not available on the computer the app is running on ?
(This problem also happens if a dll that... -
Detecting if Excel is installed from within C#
Hi There ,
I have a piece of code that opens up Excel and displays CSV files.
The thing is - if Excel is not installed , how can I detect that from within my code? (the application will throw an exception in case it is not installed).
Thanks in advance. -
Listing available SQL Servers in a network/pc
Hi There ,
I wanted to know if there's an easy way to list all available SQL Servers Names in my network/pc from a .net C# application ?
Thanks in advance. -
Thanks for your reply.
Unfortunately, my CSV files are not constant , So I basiclly want Excel to just display what it sees in the CSV (not doing any formatting of its own). I can't tell which column resides in each range , since as I just said , the application generates many different CSV files....Leave a comment:
-
Displaying CSV File in excel from within a .net application
Hi There ,
I have an application that creates a csv file and I want it to display it in excel after creation.
I've used to following code - which works well :
...Code:using ExcelInterop = Microsoft.Office.Interop.Excel; ExcelInterop._Worksheet ExcelWorkSheet; //represents the resulting worksheet. Microsoft.Office.Interop.Excel.Application excelApp = null; -
Scheduling design
Hi there,
I'm building an application that will run various reports according to given schedules.
My question is - what is the best way to implement a scheduler ?
The ideas I came up with were :
1) Creating a service for the application
2) Using windows scheduled tasks
3) Minimizing the application to the notification area in the bottom-right of the taskbar , and let it just sit in... -
-
OK...so I think that doesn't really work.
I've decided to put my query running in another thread - and I want the progressbar to run while the query is running. How do I know when the query has stopped running if it's in another thread (meaning, is there some sort of a "wait for thread to finish" function ? )Leave a comment:
-
I didn't find direct instructions on how to use threading (never used it before).
All I want is to open a new thread in which the progressbar will move back and forth (I have the logic for that so that's not the issue) - and when the query is completed I want the progressbar to disappear.
I've read about Invoke , etc etc , but didn't find something that worked well.
What should I do ? thx.Leave a comment:
-
C#\Excel - opening excel from application and autofit.
Hi,
I'm creating a project in which I create CSV files and then I want them to be displayed to the user in excel automaticlly.
I used :
...Code:Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.ApplicationClass(); excelApp.Visible = true; string path = txtOutputPath.Text; excelApp.Workbooks.Open(path, -
Hi ,
Using the Update did make it appear -but during the query execution it remains static. how can I cause it to change while the query is running (I just want it to move according to my set of instruction - for eg. back and forth). ?
Thanks.Leave a comment:
-
Using REPLACE to replace multiple values in query result
Hi,
I'm running a query that displays a list of values. for example the result will be :
a
b
c
d
I would like to replace "a","b" and "c" with strings of my own. How is that possible ? Using the "Replace" function allowed me to change only one string.
Thanks. -
Thanks. Actually the call to the "Update" method was what I was missing. why is it required by the way ?
Thanks again.Leave a comment:
-
C# - Displaying a progressbar while executing an SQL Query.
Hi ,
I would like a progress bar to be displayed while running an sql query. the progress bar doesn't have to move according to the query pace - I just want it to move back and forth while the query is executing , and to disappear when the query is completed.
My problem is that the progress bar does not appear when the query is running (I'm using the data adapter fill method in order to run my queries). What can I do... -
C# Wizard control
Hi ,
I'm creating a "wizard-like" app.
Is there a "Wizard" user control that's easy to use (because I'm currently using the Form hide form show technique which I'm not fond of) ?
Thanks in advance. -
-
So let me get it straight..shoul d the custom exception class be inside the DLL ? or in the GUI itself ? (the DLL is not sealed).
Plus - I have another problem.
one of my classes in the DLL is reading an XML file.
I want the user to be displayed with a generic "XML Parsing Error" message - nothing more than that.
if in the GUI I have the following code :
try
{
ReadXmlFunction ()...Leave a comment:
No activity results to display
Show More
Leave a comment: