 |
|
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid..
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
|
 |
I developed some com addin for excel 2003. They did no work in excel 2010. Any one used com addin for UDF in excel 2010?ùThank for your time
|
|
|
|
 |
|
 |
Com-addins in Office are usually specific to that particular version. Simple solution; move your logic to a separate assembly, and create a project for each version that you need to support.
Bastard Programmer from Hell
|
|
|
|
 |
|
 |
having any idea?
ocr from japenese to english using c# with MODI
|
|
|
|
 |
|
 |
You can OCR the Japanese, but then you'll have to run that string through a translator, like http://www.microsofttranslator.com/[^]. Look at the "For Developers" link and start reading.
|
|
|
|
 |
|
 |
I'm getting the following error with VS2010 (still training), and, I can create a text file within this directory and as a matter of fact the executable is being created, so why is this error being displayed?
Warning GettingStarted Could not create output directory 'C:\Documents and Settings\Jon\My Documents\Visual Studio 2010\Projects\Training\CreateEventLog\GettingStarted\GettingStarted\bin\Debug\'. Access is denied.
1
Jon
|
|
|
|
 |
|
 |
I am new to working with com objects and trying to figure out how to make this work. The code runs and it hits the if statement and even writes out the test message in the if statement. The problem is that when I open the excel file there is no change. It did somehow corrupt one and tell me that it is read only now and it will occasionally pop up the do you want to save this excel file message, but nothing ever shows. I have also tried Value and Value2 as I have seen in various pages, but I just can't find anything that does what I want it to do or any place that even gives good help on how to do it. This is the code I am using. A lot of it is just hardcoded test values so it really should be straight forward.
var excelDocument = new Excel.Application();
Excel.Workbook xlWorkbook = excelDocument.Workbooks.Open(@"c:/score/W5490C - Fresh.xlsx");
Excel._Worksheet xlWorksheet = xlWorkbook.Sheets[1];
Excel.Range xlRange = xlWorksheet.UsedRange;
int rowCount = xlRange.Rows.Count;
int colCount = xlRange.Columns.Count;
//Calculate and record the air losses.
int totalAircraftLostAA = 0;
int totalAircraftLostSA = 0;
ScoreCalculations.CalculateEnemyAirLosses(events, ref totalAircraftLostAA, ref totalAircraftLostSA);
int column = 3;
for (int row = 1; row <= rowCount; row++)
{
if (xlRange.Cells[row, 1].Value2.ToString() == "Aircraft Kills (A-A)")
{
Console.WriteLine(xlWorkbook.Sheets[1]);
Console.WriteLine("write attempted");
xlRange.Cells[row, column].Value2 = totalAircraftLostAA;
}
}
//Calculate and record ally airlosses
ScoreCalculations.CalculateAllyAirLosses(events);
//Calculate and record expended Ordnance
ScoreCalculations.CalculateExpendedOrdnance(events);
//Calculate and record ground targets hit
ScoreCalculations.CalculateNamedGroundTargets(events);
xlWorkbook.Save();
xlWorkbook.Close();
Thanks to anyone that can see what is probably the dumb mistake that I am making.
Jimmy
|
|
|
|
 |
|
 |
if (xlRange.Cells[row, 1].Value2.ToString() == "Aircraft Kills (A-A)")
You cannot compare strings like this, you need to use the String.Equals()[^] method.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
 |
|
 |
Greetings.
I need to make a bar graphic divided by months. But the Axis' Type I'm using is DateAsOrdinal (instead of Text) and I need the bars to be inner the tics.
I read in zedgraph documentation that IsBetweenLabels only works with AxisType.Text.
GraphPane painel = masterPane[0];
PointPairList pointPairList = MyDataSource.getList();
BarItem barra = painel.AddBar(listastring, pointPairList, coresbarra[i]);
painel.XAxis.Type = AxisType.DateAsOrdinal;
painel.XAxis.MajorTic.IsBetweenLabels = true;
How can I resolve this? Thank you for your attention.
|
|
|
|
 |
|
 |
Hi all,
I'm fairly new at programming, having taken a few classes in college over the last semster. One thing I'm interested in doing is programming my own HTML editor or JavaScript editor.
I have absolutely no clue where to even begin. All my courses have taught the basics of programming by sending our output to a console window. I just purchased a C# book, and am waiting on it to arrive from Amazon.
My question (I know it took long enough to get to it) is if anyone can point me to any tutorials on how to create a standard text editor that can parse input and change the colors of the text like html editors and ide's do.
Thanks,
Jeramy
|
|
|
|
 |
|
 |
jeramyRR wrote: My question (I know it took long enough to get to it) is if anyone can point me to any tutorials on how to create a standard text editor that can parse input and change the colors of the text like html editors and ide's do.
May I suggest small steps? Like creating a text-editor[^] first, and then learn how to integrate a loading-routine with a parser? Or do you want to dive in directly[^]?
Bastard Programmer from Hell
|
|
|
|
 |
|
 |
No. No. Small steps first, most definitely. I want to learn the right way.
|
|
|
|
 |
|
 |
hey everyone plz help me.. i want to generate the html tree from xml file using XSLT ? is it possible ?
.. kindly reply.. regards..
modified 22 hrs ago.
|
|
|
|
 |
|
 |
Googling the following terms turned up 100,000+ hits. First synopsis of that list seemed relevant to me.
"html tree" xslt
|
|
|
|
 |
|
 |
hy.. no it didnt work for me..i need collapse and expand all functionality in the tree..but this code didnt work.anyways thanks
|
|
|
|
 |
|
 |
Hi
how can i convert the following txt file to xls file. perticular data in txt should be stored on pertular xls cell.
sample txt file:
txt1 txt2 txt3 txt4
txt5 txt6 txt7 txt8
txt4 txt3 txt2 txt1
This sample txt data (each "txt") should be stored in perticular xls cell.
can anyone give me a C# code which does this.
|
|
|
|
 |
|
 |
if you replace the spaces by comma's, you end up with comma separated values, and CSV files now that is something Excel likes a lot.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
 |
|
 |
did not completly understand your word. can u give me any sample code to convert:
txt to xls
OR
txt to CSV to xls
accually data goes like this:
txt1 txt2 txt3 txt4
txt5 txt6 txt7 txt8
txt4 txt3 txt2 txt1
the above is a variable row, so that set of row should be stored on perticular cell on xls. then the next set of rows should be stored on next perticular set of cells.
|
|
|
|
 |
|
 |
if a simple CSV import doesn't do what you want, then you will need to use the Office Primary Interop Assemblies[^]. I trust CodeProject holds some example articles on the subject. I've never used it myself.
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
|
|
|
|
 |
|
 |
taurusone wrote: can anyone give me a C# code which does this.
This is a site for programmers - not a restaurant where you can order stuff.
Create a CSV file, open it in Excel. You'll see that it simply opens the CSV file, and treats it whether it was a regular Excel-file. That means that you can concatenate all your files into a single string, separated by comma's, and write it to a CSV.
Bastard Programmer from Hell
|
|
|
|
 |
|
 |
yes i know it is not restaurant and i am not ordering, it a request.
input file:
table 1:
txt1 txt2 txt3 txt4
txt5 txt6 txt7 txt8
txt4 txt3 txt2 txt1
table 2:
txt1 txt2 txt3 txt4
txt5 txt6 txt7 txt8
txt4 txt3 txt2 txt1
txt4 txt3 txt2 txt1
txt4 txt3 txt2 txt1
note that the table rows or variging. i want to write a code which
wanted output xls file:
table 1:
sume of first col: sum of say 3rd col:
txt1 txt3
txt5 txt7
txt4 txt2
table2: <same as above>
Plz dont misunderstand me point me to site which has c# code to do this or atleast give me an overview or idea about implenting this in c#.
|
|
|
|
 |
|
 |
taurusone wrote: yes i know it is not restaurant and i am not ordering, it a request.
Aight, we'll walk you through it, from start to finish. Can you paste the sourcecode to read/write a textfile here? Once you got that, you're halfway.
taurusone wrote: Plz dont misunderstand me point me to site which has c# code to do this or atleast give me an overview or idea about implenting this in c#.
Luc gave you an idea, even though it requires some basic programming-skills. There's little chance that anyone will post code "at request" that does "what I want".
..but we can walk you trough writing such a thing. Seems the best idea, as that'd mean that you'll understand every line of code, and will be able to change it when required. So, let's see your code on reading/writing text files
Bastard Programmer from Hell
|
|
|
|
 |
|
 |
So you want the first and third columns only.
So write a program that extracts the first and third columns and write those to a text file.
Then you can use excel to open the file using a CSV format. Excel actually allows for a choice of what is used as a separator. Myself I use tab.
|
|
|
|
 |
|
 |
This article[^] will show you how to do it.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
 |