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

EntityDataLoader only works with CSV if the location ends with ".csv" #554

Open
eigood opened this issue Nov 9, 2022 · 0 comments
Open

Comments

@eigood
Copy link
Contributor

eigood commented Nov 9, 2022

The trailing '#extension.csv' is a hack, to get around the loadSingleFile extension checking logic. In an ideal situation, the resource facade would return a tuple, the contentType+inputstream of the target.

In the following url, key is the random sheet identifier, and gid is the sub-tab(default of 0 for the first tab that is created).

I don't have a patch at this time, as a proper fix would probably be quite a bit of code.

            <script><![CDATA[
                loader = ec.entity.makeDataLoader()
                loader.csvEntityName(serviceName)
                loader.location("https://docs.google.com/spreadsheets/d/${key}/export?format=csv&gid=${gid}#extension.csv")
                loader.load()
            ]]></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant