|
I am trying to automate MSExcel and have so far been unsuccessfull converting text to columns. Does anyone have an example using the excel texttocolumns method?
Thanks
|
|
|
|
|
One of the best pieces of advice... use the macro recorder ! Open the editor and its crystal clear how you can work with the object model to do C# code!
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
This is how I have gotten through most if the issues I have encountered, but I have been unable to convert the VBS to C# when it comes to converting text to columns
Thanks
|
|
|
|
|
I'm interfacing with the iTunes SDK and need to grab the "artwork". Writing these files to disk is quite easy as the SDK provides a method SaveArtworkToFile(string path) to write the file out to disk. I currently then turn around and read the image back in for use.
I'd really like to get around having to write out the file. Is there some way to "trick" the SDK into thinking it's writing the file to disk but instead write it to some kind of memory stream? Keep it mind that this is the only call made available to get the artwork and that it only accepts the path for writing out the file.
That's why I called it a "virtual file".
|
|
|
|
|
Matt Philmon wrote:
Keep it mind that this is the only call made available to get the artwork and that it only accepts the path for writing out the file.
Then it that case, no there isn't. If there is no function to return a pointer to the image, you're pretty much limited to writing it to a temp file and reloading it in a more accessible form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yeah, I really guess I knew that. I was just hoping there was some arcane use of MemoryStream or some other mechanism that could give me what I need. That would be pretty cool if you could do that... somehow make that function think it's writing to disk when it's actually writing to memory.
|
|
|
|
|
Matt Philmon wrote:
somehow make that function think it's writing to disk when it's actually writing to memory.
You could use a memory-mapped file (read the MapViewOfFile API call documentation for this).
But it is really overkill.
Yes, even I am blogging now!
|
|
|
|
|
Hi,
I need to display a treeview control node with: a check box, icon, title and a bitmap under the title.
Anyone have any ideas on how to do this?
thanks,
Chuck
|
|
|
|
|
Hi, I have problems with reading xml files tha contains values with ñ char, li this:
<br />
<BaseDatos>Piña</BaseDatos><br />
this throw me an exception:
<br />
XmlDataDocument DocumentoXML =new XmlDataDocument();<br />
DataSet DS = new DataSet();<br />
DS = DocumentoXML.DataSet;<br />
DS.ReadXml("file.xml");<br />
What I need to do to deal with in this case?
Than you
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
One way of changing encoding is to have this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
I am seeing an unusual problem, I have a main windows form that opens a form using showdialog. If there is an exception in that "subform" during a debug run the IDE shows it as being in the main form and if I break it breaks at the ShowDialog in the main form and not at the actual code that caused the exception in the sub form.
I don't see this in any other projects, any ideas? Could it be a project setting somewhere gone awry or...?
|
|
|
|
|
I take it you see a green triangle, too. This happens when the exception occured in an native API call or in another unmanaged thread. The debugger can't figure out where it happened, so it positions the indicator to the caller that spawned the message pump. This also happens for a top-level form, when the green triangle is position just after the Application.Run call (it's after because of the return address being after the function call itself, in terms of the JIT'd native code).
BTW: Congrats on receiving my 8,000th response! Just had to tell someone.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Any gift for the guy receiving your 8,000th response, Heath? Perhaps it's already in Santa's Christmas list
|
|
|
|
|
What, and leave the guy that responded to roughly 8,000 questions with nothing?
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Heath Stewart wrote:
This happens when the exception occured in an native API call or in another unmanaged thread.
I wish it were something like that, in this case it's neither. For example, I can, in one of those sub forms simply do something like attempt to access a null string and the IDE will break and will show the exception being in the code that called showdialog for that sub form.
If I attempt the exact same thing in a test project it breaks into the null access (for example) as expected.
There is no green rectangle, I know exactly what you mean about an exception in unmanaged or native code, this isn't the same thing at all, it's a simple exception in a form that was created through showdialog from another form in this one project.
The only thing unique about this project is that the solution overall is huge and has both the business tier and UI tier in it.
It's really bizarre and annoying, oh well, maybe it will clear up in vs2005.
Thanks for replying.
|
|
|
|
|
I was wondering how to create a file association in my app. So when the user double-clicks on a saved file (a file that was created using serialization), the program will execute and open the file. Also, how can a file icon association be created in the registry? I wasn't able to find to much on the web doing a search. Any help greatly appreciated.
Brian
|
|
|
|
|
This need to be done as part of your setup routine, like an installation program. Visual Studio .NET has a deployment project that makes this very easy.
Otherwise, read Creating a File Association[^] in the Platform SDK.
Your setup routine should not hard-code the path to your executable. Using VS.NET's Windows Installer project you can associate your executable file with the extension so that the right path is used. In less "automated" setup environment you associate the executable's file path with the target application for that file extension. Just try it out. It's quite easy.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Ladies and Gentleman,
How can I create a relative path in a .config file? Basically so I can tell the logging project im using to insert the log at the applications location\log.
Thanks,
Ryan
|
|
|
|
|
What's in the config file has nothing to do with how it's interpreted. The logging project's IConfigurationSectionHandler must understand relative paths and treat them as such. Only the project documentation can tell you whether or not it's supported, but since you didn't tell us what logging project you're even using (assuming it's a public release) we can't really help you.
It's the logging project that handles relative paths or not. What's in the .config file is just data.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Im using log4net, with the file appender, which has you specifically put the path of the log file to be created in the file appender. Unless there is a better way of doing it.
|
|
|
|
|
If you have questions about managed (i.e., not as in ".NET") projects - like those on SourceForge - please ask in their forums. For the log4net SF project page, see http://sourceforge.net/projects/log4net[^]. Your question is specific to their project, not to .config files (again, because the .config files contain just data - it's the implementation of the configuration section that interprets that data).
It's mainly for your benefit: you'll get more concise help for a project that offers it than on a general forum. You'll also learn more by looking at their source code, which - since it is on SF - is available in their CVS reposity - which is also viewable online - and more often than not as a separate download.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I had/have the same problem as you, too. I even tried to find the appender at runtime and make its relative path as an absolute, but it already did it itself. I tried to set a config value of "~/MyLogfile.log" and replace the tilde at runtime.
Maybe you could derive your own class from FileAppender and implement that behavior? What you can do is to place placeholders like "${SystemDrive} " in the path and let it expand it during runtime for you. See the docs for details.
--
Affordable Windows-based CMS: www.zeta-producer.com
|
|
|
|
|
Ahh, thats a good idea, thanks Uwe.
Ryan
|
|
|
|
|
Hello
I made a UserControl containing a ComboBox and I want the "Items" property of the combo relayed to my UserControl :
public class MyUserControl : System.Windows.Forms.UserControl
{
private ComboBox cb;
[...]
public ComboBox.ObjectCollection Items
{
get
{
return cb.Items;
}
}
}
This works but the UITypeEditor isn't "string collection editor" as it is for the ComboBox, but "object collection editor".
So basically, it isn't useful at all.
Is there a way i can force the UITypeEditor being a StringCollectionEditor, even though this class seems to be an internal framewok class ?
Thanks,
Etienne.
|
|
|
|
|
have you tried just marking up your accessor with the correct attribute?
[Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
public ComboBox.ObjectCollection Items
{
get
{
return cb.Items;
}
set
{
cb.Items = value;
}
}
|
|
|
|