|
I want to write a program to compile file html to file XML.How should I do? anyone help me?
|
|
|
|
|
Can I use some codes to protect/unprotect the workbook in excel (just as select Tools -> Protect -> Protect Workbook) ?
|
|
|
|
|
What does this have to do with C#? Are you trying to do it through a C# app? If yo are, take a look at the MS Office Interop...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
actually, I want to implement this by using POI, but it throws exception. So I would like to know whether I can do this by using MS PIA and C#. Is it feasible to do this ?
|
|
|
|
|
sammak168 wrote: POI
sammak168 wrote: MS PIA
What are those?
I generally do all of my MS Office/C# using the Office Interop. I think you can do the protection of the workbook this way, too.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi Paul,
For MS PIA, I refer to Microsoft Primary Interop Assemblies.
Can I do something like select "Tools->Protection->Protect workbook" from the menu in Microsoft Excel by using Office Interop ?
Please give me some hints and help. Thanks in advanced.
|
|
|
|
|
Excel.Worksheet has a Protect method. I am not 100% sure if this is it, but you may want to look at it.
sammak168 wrote: Can I do something like select "Tools->Protection->Protect workbook" from the menu in Microsoft Excel by using Office Interop ?
Maybe as a macro or something. I'll give it some thought
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
And some recruiter said doing research in a programming job was unacceptable. What BS...
|
|
|
|
|
Dave Kreskowiak wrote: some recruiter said doing research in a programming job was unacceptable
Yeah. Researching on solving a problem is what programmers should know how to do and it is part of the job
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Ive tried lookimng for exampled but i just cant find anything useful and to be honest the code confuses the hell out of me ive never used c#s xml writing caibilities before.
Ok im trying to get the basic c# application i made to modify the value of status in the xml file below (it wouldnt let me post xml tags replace them in notepad)
{?xml version="1.0" encoding="utf-8" ?}
{StatusMonitor}
{CurrentStatus sourceurl="http://blah.net"}
{item type="Entry"}
{Value}Online{/Value}
{/item}
{/CurrentStatus}
{/StatusMonitor}
i need to keep the xml file the same it has to be imported into flash i just need to change the value of {Value}Online{/Value} based on which of the 4 buttons in my app i click theyres no need to make new {item type="Entry"}..{/item} at sall i only need one
Can anyone tell me how to do this ?
Thanks
|
|
|
|
|
checking 'Ignore HTML tags in this message (good for code snippets)' will allow you to post XML.
Use XmlDocument to find the node you want ( //CurrentStatus will work as an XPath ) and then grab the subitem or attribute you want to change, and change it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ah right sorry , im completly new to xml inm c# the code confuses the hell out of me but i guess thats awalys the way with something new
Im not ready to write my own xml handling yet can you post an example that changes that value ? theyres going to be a lot of repition in this app so ill be able to lear how to do the resat myself
thanks
|
|
|
|
|
http://support.microsoft.com/kb/317666[^]
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Looks like a good link
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
hi there,
i wanna know that how can i make a int that store number like 00 instead of 0
for instance
if i add 1 to it then it should be 01 instead of 1
but after 09 it should be 10 not 010
i hope you understand what i wanna say ;)
|
|
|
|
|
xmen_xwk wrote: i wanna know that how can i make a int that store number like 00 instead of 0
No you can not store an int like this...but while displaying you can always use string formatting to show them in whatever way you want...
Hope this helps
|
|
|
|
|
A number is a number. you're talking about a rendering detail. A number is not 'stored' in any format, you decide how it looks ( if it has leading 0s, if it's shown in hex, etc ) when you display it ( using the Format method on the string class )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You can only do this through formatting as a string for output.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
the format string in some formatting methods will do that for you.
Example:
int i=9;
Console.WriteLine(i.ToString("00"));
prints 09
|
|
|
|
|
Use the format method in the String class to show the number as you want.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Gee - 5 people have already answered this, what did your answer add ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Just now i signed in CG and i answered my suggestions for that.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
It added a nice , which none of the others did. I think flowers with an answer is the way forward on these forums.
It also knocked up his messages posted count by 1 - I reckon he's after your number one spot!! He'll be into thrash metal soon.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Yep. Wonder if Satips is listening to Ratt, Quiet Riot or Twisted Sister right now
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|