Tutti i paragrafi che si sovrappongono all'intervallo specificato sono elencati puntati. Se l'intervallo specificato
si sovrappone a una tabella, i punti elenco vengono applicati all'interno delle celle della tabella. Il
livello di nidificazione di ogni paragrafo viene determinato contando i rientri iniziali davanti
a ogni paragrafo.
Non puoi modificare il livello di rientro di un punto elenco esistente.
Devi invece eliminare il punto elenco, impostare le tabulazioni iniziali davanti al
paragrafo e quindi creare di nuovo il punto elenco. Per ulteriori informazioni, vedi Rimuovere
i punti elenco da un elenco.
Puoi anche utilizzare CreateParagraphBulletsRequest per modificare lo stile dei punti elenco di
un elenco esistente.
Il seguente esempio di codice mostra una richiesta batch che prima inserisce il testo all'inizio del documento, poi crea un elenco dai paragrafi che si estendono per i primi 50 caratteri. BulletGlyphPreset utilizza
BULLET_ARROW_DIAMOND_DISC, il che significa che i primi tre livelli di nidificazione dell'elenco puntato sono rappresentati da una freccia, un rombo e un cerchio.
Il metodo elimina tutti i punti elenco che si sovrappongono all'intervallo specificato, indipendentemente dal
livello di nidificazione. Per preservare visivamente il livello di nidificazione, viene aggiunto un rientro all'inizio di ogni paragrafo corrispondente.
Il seguente esempio di codice mostra una richiesta batch che elimina i punti elenco da un
elenco di paragrafi.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-08-29 UTC."],[],[],null,["# Work with lists\n\nThe Google Docs API supports converting plain paragraphs to bulleted lists and\nremoving bullets from paragraphs.\n\nConvert a paragraph to a list\n-----------------------------\n\nA common paragraph formatting operation is converting paragraphs into a bulleted\nlist.\n\nTo create a list, use the\n[`documents.batchUpdate`](/workspace/docs/api/reference/rest/v1/documents/batchUpdate)\nmethod and supply a\n[`CreateParagraphBulletsRequest`](/workspace/docs/api/reference/rest/v1/documents/request#createparagraphbulletsrequest).\nInclude a [`Range`](/workspace/docs/api/reference/rest/v1/documents#Range) to specify the\naffected cells and a\n[`BulletGlyphPreset`](/workspace/docs/api/reference/rest/v1/documents/request#bulletglyphpreset)\nto set the pattern for the bullet.\n\nAll paragraphs that overlap with the given range are bulleted. If the specified\nrange overlaps with a table, the bullets are applied within the table cells. The\nnesting level of each paragraph is determined by counting leading tabs in front\nof each paragraph.\n\nYou can't adjust the nesting level of an existing bullet.\nInstead, you must delete the bullet, set the leading tabs in front of the\nparagraph, and then create the bullet again. For more information, see [Remove\nbullets from a list](#remove-list).\n\nYou can also use `CreateParagraphBulletsRequest` to change the bullet style for\nan existing list.\n\nThe following code sample shows a batch request that first inserts text at the\nstart of the document, and then it creates a list from the paragraphs spanning\nthe first 50 characters. The `BulletGlyphPreset` uses\n`BULLET_ARROW_DIAMOND_DISC` which means the first three nesting levels of the\nbulleted list are represented by an arrow, a diamond, and a disc. \n\n### Java\n\n```java\nList\u003cRequest\u003e requests = new ArrayList\u003c\u003e();\nrequests.add(new Request().setInsertText(new InsertTextRequest()\n .setText(\"Item One\\n\")\n .setLocation(new Location().setIndex(1).setTabId(TAB_ID))));\n\nrequests.add(new Request().setCreateParagraphBullets(\n new CreateParagraphBulletsRequest()\n .setRange(new Range()\n .setStartIndex(1)\n .setEndIndex(50)\n .setTabId(TAB_ID))\n .setBulletPreset(\"BULLET_ARROW_DIAMOND_DISC\")));\n\nBatchUpdateDocumentRequest body = new BatchUpdateDocumentRequest().setRequests(requests);\nBatchUpdateDocumentResponse response = docsService.documents()\n .batchUpdate(DOCUMENT_ID, body).execute();\n```\n\n### Python\n\n```python\nrequests = [\n {\n 'insertText': {\n 'location': {\n 'index': 1,\n 'tabId': TAB_ID\n },\n 'text': 'Item One\\n',\n }}, {\n 'createParagraphBullets': {\n 'range': {\n 'startIndex': 1,\n 'endIndex': 50,\n 'tabId': TAB_ID\n },\n 'bulletPreset': 'BULLET_ARROW_DIAMOND_DISC',\n }\n }\n]\n\nresult = service.documents().batchUpdate(\n documentId=DOCUMENT_ID, body={'requests': requests}).execute()\n```\n**Figure 1.** Convert a paragraph to a list.\n\nRemove bullets from a list\n--------------------------\n\nTo remove bullets from a paragraph list, use the\n[`documents.batchUpdate`](/workspace/docs/api/reference/rest/v1/documents/batchUpdate)\nmethod and supply a\n[`DeleteParagraphBulletsRequest`](/workspace/docs/api/reference/rest/v1/documents/request#deleteparagraphbulletsrequest).\nInclude a [`Range`](/workspace/docs/api/reference/rest/v1/documents#Range) to specify the\naffected cells.\n\nThe method deletes all bullets that overlap with the given range, regardless of\nnesting level. To visually preserve the nesting level, indentation is added to\nthe start of each corresponding paragraph.\n\nThe following code sample shows a batch request that deletes bullets from a\nparagraph list. \n\n### Java\n\n```java\nList\u003cRequest\u003e requests = new ArrayList\u003c\u003e();\nrequests.add(new Request().setDeleteParagraphBullets(\n new DeleteParagraphBulletsRequest()\n .setRange(new Range()\n .setStartIndex(1)\n .setEndIndex(50)\n .setTabId(TAB_ID))));\n\nBatchUpdateDocumentRequest body = new BatchUpdateDocumentRequest().setRequests(requests);\nBatchUpdateDocumentResponse response = docsService.documents()\n .batchUpdate(DOCUMENT_ID, body).execute();\n```\n\n### Python\n\n```python\nrequests = [\n {\n 'deleteParagraphBullets': {\n 'range': {\n 'startIndex': 1,\n 'endIndex': 50,\n 'tabId': TAB_ID\n },\n }\n }\n]\n\nresult = service.documents().batchUpdate(\n documentId=DOCUMENT_ID, body={'requests': requests}).execute()\n```"]]