I tried the BinaryReader but still have the same problem. Here's the code:
while ((br.BaseStream.ReadByte()) != -1 ){
br.BaseStream.Position = br.BaseStream.Position - 1;
ch = br.ReadChar();
if (ch != '\n'){
s = s+ch;}
else{// do something with the s
}
s = "";
}
"tomer" <to***@walla.com> schrieb im Newsbeitrag
news:eg****************@TK2MSFTNGP15.phx.gbl...
Hi,
Try to use "BinaryReader" with "System.Text.Encoding.Unicode" instead of
"StreamReader".
Tomer.
"Stefan Seidel" <je****@microsoft.com> wrote in message
news:cl**********@sagnix.uni-muenster.de... Hi NG,
i try to read data into a .NET application from Excel with the following
code:
IDataObject cb = Clipboard.GetDataObject();
if ( cb.GetDataPresent(DataFormats.CommaSeparatedValue) ) {
StreamReader sr = new StreamReader((Stream)
cb.GetData(DataFormats.CommaSeparatedValue));
while (sr.Peek() > 0)
string s = sr.ReadLine();
}
The problem ist that i do not receive some signs (special signs as
german "ä" e.g.).
Thanks for any help
Stefan