Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pls remove throw new ArgumentException("Tablename has spaces") at ExcelTableCollection.ValidateTableName,xlsx is allowed worksheet name Contains empty #558

Open
1257960069 opened this issue Apr 26, 2024 · 0 comments

Comments

@1257960069
Copy link

Expected behaviour

Tell us what should happen.

public class ExcelTableCollection : IEnumerable<ExcelTable>, IEnumerable
private void ValidateTableName(string Name)
{
	if (string.IsNullOrEmpty(Name))
	{
		throw new ArgumentException("Tablename is null or empty");
	}
	char c = Name[0];
	if (!char.IsLetter(c) && c != '_' && c != '\\')
	{
		throw new ArgumentException("Tablename start with invalid character");
	}
	if (Name.Contains(" "))
	{
		throw new ArgumentException("Tablename has spaces");
	}
}

Actual behaviour

Tell us what happens instead. Provide a log message if relevant.
xlsx is allow worksheet name Contains empty

I'm seeing this behaviour on

Remove this hint: these checkboxes can be checked like this: [x]

  • [ x] Magicodes.IE.Excel

package versions

Example: Magicodes.IE.Excel 2.2.2, Magicodes.IE.Pdf 1.0

So how can we reproduce this?

Remove this hint: Pick one of these - use the Preview feature of this editor to get a sense which option we like best

Awesome ⭐⭐⭐⭐⭐

Provide a (link to a) minimal demo app showing the faulty behaviour.

Sweet ⭐⭐⭐⭐

Provide a concise code sample which can upload attachments.

Good ⭐⭐⭐

Provide your own app and instructions how to reproduce the issue.

Meh ⭐⭐

Provide a code sample with a bunch of magic parameters which I need to interpolate by guessing to reconstruct the actual runtime code.

Worst 💩

Say the source code can't be disclosed and refuse to provide any of the above. Expect this issue to be closed by a bunch of angry aliens 👽👽👽👽👽 that will hunt you down and 🔥 your 💻. You've been warned. 🚒

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant