Hi SajjuAhmed,
You need to replace the space with empty using replace method below are the two places where you need to make the changes in source code provided by the author.
valore = String.Format(templateValore, dt.Columns[i].ColumnName);
GeneraSezioneTabella method's replace above line of code with below.
valore = String.Format(templateValore, Regex.Replace(dt.Columns[i].ColumnName, @"[^0-9a-zA-Z]+", ""));
for (int i = 0; i < dt.Columns.Count; i++)
{
writer.WriteStartElement("Field");
writer.WriteAttributeString("Name", dt.Columns[i].ColumnName);
{
writer.WriteElementString("DataField", dt.Columns[i].ColumnName);
writer.WriteElementString("rd", "TypeName", nsRd, dt.Columns[i].DataType.ToString());
}
writer.WriteEndElement();
}
replace above AddDataSet methods for loop with below.
for (int i = 0; i < dt.Columns.Count; i++)
{
writer.WriteStartElement("Field");
string columnName = Regex.Replace(dt.Columns[i].ColumnName, @"[^0-9a-zA-Z]+", "");
writer.WriteAttributeString("Name", columnName);
{
writer.WriteElementString("DataField", dt.Columns[i].ColumnName);
writer.WriteElementString("rd", "TypeName", nsRd, dt.Columns[i].DataType.ToString());
}
writer.WriteEndElement();
}