# Failed precondition

**URL:** <https://forum.getodk.org/t/failed-precondition/21753>\
**Category:** Support\
**Tags:** google-sheets\
**Created:** [August 30, 2019, 6:09am UTC](https://forum.getodk.org/t/failed-precondition/21753 "2019-08-30T06:09:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 6:09am UTC](https://forum.getodk.org/t/failed-precondition/21753/1 "2019-08-30T06:09:52Z")

</div>

**1. What is the problem? Be very detailed.**  
Google Sheets submissions don't allow underscores in the column name. If you intend to use Google Sheets submissions, replace underscores with hyphens in the following names:  
When I try to submit data, I get FAILED PRECONDITION error  
**2. What app or server are you using and on what device and operating system? Include version numbers.**  
Google sheet server. Am using Huawei phone p9

**3. What you have you tried to fix the problem?**  
I have tried to remove underscore

**4. What steps can we take to reproduce the problem?**  
Create a form on Kobo toolbox. Then after uploading to google drive, download it to create a xml file  
**5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.**

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 30, 2019, 10:53am UTC](https://forum.getodk.org/t/failed-precondition/21753/2 "2019-08-30T10:53:33Z")

</div>

Hi @Jomoko  
welcome to the forum! Please [introduce yourself here!](https://forum.getodk.org/t/introduce-yourself-here/)

do you get that error converting forms or sending finalized forms to google sheets? I guess it's during converting because I tried a form with underscores and I was able to send finalized instances to google sheet.

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 12:26pm UTC](https://forum.getodk.org/t/failed-precondition/21753/3 "2019-08-30T12:26:14Z")

</div>

Hi @Grzesiek2010.  
Thanks.

Am getting the error when submitting to google sheets.

Please share the link you are using to convert to XML

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 30, 2019, 12:28pm UTC](https://forum.getodk.org/t/failed-precondition/21753/4 "2019-08-30T12:28:31Z")

</div>

I used [http://opendatakit.org/xlsform/](http://opendatakit.org/xlsform/)  
what collect version do you use?  
Could you share your form?

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 12:34pm UTC](https://forum.getodk.org/t/failed-precondition/21753/5 "2019-08-30T12:34:54Z")

</div>

[Tyer.xml](https://forum.getodk.org/uploads/short-url/xaRGXhZBVc5bZpBQrS8KzSK8NGi.xml) (1.4 KB) [Tyer.xlsx](https://forum.getodk.org/uploads/short-url/gc0Pp797h3sOAaD9IyFYTdqlNw1.xlsx) (18.2 KB)

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 12:37pm UTC](https://forum.getodk.org/t/failed-precondition/21753/6 "2019-08-30T12:37:35Z")

</div>

I used the same link to convert.

The ODK collect app s v1.23.0

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 12:39pm UTC](https://forum.getodk.org/t/failed-precondition/21753/7 "2019-08-30T12:39:29Z")

</div>

Neither this is also working[Tyre.xlsx](https://forum.getodk.org/uploads/short-url/egTdqVmiOAB2XkfCvDS8PuRmIxF.xlsx) (22.1 KB)

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 30, 2019, 12:53pm UTC](https://forum.getodk.org/t/failed-precondition/21753/8 "2019-08-30T12:53:10Z")

</div>

The form itself is ok (at least the second one because I tried it) I was able to send a finalized form but using my own sheet. Are you share you have an access to the sheet you are trying to use? If I can't open it so maybe you have the same problem? [https://docs.google.com/spreadsheets/d/1f5VwPwSUIUjAH3bb546DdzNz0MZIh4nv/edit#gid=1645773243](https://docs.google.com/spreadsheets/d/1f5VwPwSUIUjAH3bb546DdzNz0MZIh4nv/edit#gid=1645773243)

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 1:00pm UTC](https://forum.getodk.org/t/failed-precondition/21753/9 "2019-08-30T13:00:43Z")

</div>

so what is making it to result to an error?

[https://docs.google.com/spreadsheets/d/1f5VwPwSUIUjAH3bb546DdzNz0MZIh4nv/edit#gid=1645773243](https://docs.google.com/spreadsheets/d/1f5VwPwSUIUjAH3bb546DdzNz0MZIh4nv/edit#gid=1645773243) is working fine

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 1:01pm UTC](https://forum.getodk.org/t/failed-precondition/21753/10 "2019-08-30T13:01:30Z")

</div>

do you mind sharing the XML you converted?

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 30, 2019, 1:03pm UTC](https://forum.getodk.org/t/failed-precondition/21753/11 "2019-08-30T13:03:22Z")

</div>

I've just requested access could you accept it? Then I could check what's wrong.

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 1:09pm UTC](https://forum.getodk.org/t/failed-precondition/21753/12 "2019-08-30T13:09:06Z")

</div>

Granted access on the sheet

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 30, 2019, 1:18pm UTC](https://forum.getodk.org/t/failed-precondition/21753/13 "2019-08-30T13:18:59Z")

</div>

Have you created this spreadsheet using Excel or something like that and uploaded to Google Drive? If so it won't work please take a look here: [Error 400 Bad Request "failed\_precondition" on Collect to Google sheets](https://forum.getodk.org/t/error-400-bad-request-failed-precondition-on-collect-to-google-sheets/19801)

It's the same issue. You need to create such a spreadsheet suing Google Sheets.

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 1:38pm UTC](https://forum.getodk.org/t/failed-precondition/21753/14 "2019-08-30T13:38:05Z")

</div>

So I start from scratch, create the survey, choices, setting and responses on google sheets?

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 30, 2019, 1:39pm UTC](https://forum.getodk.org/t/failed-precondition/21753/15 "2019-08-30T13:39:14Z")

</div>

Yeah just do that and let us know if it solves your problem.

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 30, 2019, 1:40pm UTC](https://forum.getodk.org/t/failed-precondition/21753/16 "2019-08-30T13:40:18Z")

</div>

Okay. Will let you know. But I have never encountered such even though have been uploading an excel all times.

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [August 30, 2019, 1:43pm UTC](https://forum.getodk.org/t/failed-precondition/21753/17 "2019-08-30T13:43:33Z")

</div>

I mean you can create a form using excel but the spreadsheet you want to use to upload submissions must be created using Google Sheets.

---

<div class="post-metadata">

**Author:** ![Jomoko](https://getodk.b-cdn.net/letter_avatar_proxy/v4/letter/j/f6c823/32.png) [@Jomoko](https://forum.getodk.org/u/Jomoko)\
**Post date:** [August 31, 2019, 7:49am UTC](https://forum.getodk.org/t/failed-precondition/21753/18 "2019-08-31T07:49:06Z")

</div>

I was able to solve the issue. Thanks

---

<div class="post-metadata">

**Author:** ![Derrick\_William](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/derrick_william/32/8974_2.png) [@Derrick\_William](https://forum.getodk.org/u/Derrick_William)\
**Post date:** [October 14, 2019, 8:02am UTC](https://forum.getodk.org/t/failed-precondition/21753/19 "2019-10-14T08:02:53Z")

</div>

How did you solve that?

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [October 16, 2019, 7:16am UTC](https://forum.getodk.org/t/failed-precondition/21753/20 "2019-10-16T07:16:28Z")

</div>

The quick answer is that you the spreadsheet you want to use to upload filled forms has to be created using Google Sheets, it can't be an xls file uploaded to your google drive and just opened via Google Sheets.  
Read all answers here and [Error 400 Bad Request "failed\_precondition" on Collect to Google sheets](https://forum.getodk.org/t/error-400-bad-request-failed-precondition-on-collect-to-google-sheets/19801)

[Next page](https://forum.getodk.org/t/failed-precondition/21753.md?page=2)
